Skip to content

Systems without sunvault have NaN data which is invalid json #4

@chuckakung

Description

@chuckakung

PVS model

PVS6

PVS firmware version

recent

Does the README's curl test return JSON?

Yes, returns JSON

What happened

When a PVS livedata field (e.g. ess_p) comes back as "nan" / a NaN
float, float(...) succeeds without raising, so it bypasses the
except (ValueError, TypeError) guards in _inject_battery. json.dumps
then emits a bare NaN token, which is valid for Python's json module but
invalid JSON — the browser's JSON.parse rejects it and the whole
/devices fetch fails.

Container logs

Where you're running it

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions