keshavdv / victron-ble

A Python API to parse Victron Instant Readout BLE advertisements
The Unlicense
96 stars 33 forks source link

Report 65535 remaining minutes of runtime as infinity #10

Closed stefanor closed 1 year ago

stefanor commented 1 year ago

I'm in two minds about this change. It matches what the app shows, but will probably cause downstream data issues. (JSON can't render infinity, for example)

Have you already considered this?

keshavdv commented 1 year ago

I think maybe this should be deferred to the presentation layer and we pass through the raw data as-is. I see a few usecases (i.e. a Home Assistant plugin I'm working on) being unhappy with this since they don't natively support a sensor returning "infinity" and I imagine I and others will just convert this back to some magic large number anyway to make it happy.

stefanor commented 1 year ago

Yeah, I am feeding this data into SignalK and then InfluxDB, I am predicting the same problems...