markvader / sonic

Sonic water shutoff valve Home Assistant integration by @markvader
MIT License
14 stars 3 forks source link

To do - conversion in integration for millilitres/min to L/min #8

Closed markvader closed 2 years ago

markvader commented 2 years ago

No equivalent volume flow rates available as a constant in home assistant so must be done in integration VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR: Final = "m³/h" VOLUME_FLOW_RATE_CUBIC_FEET_PER_MINUTE: Final = "ft³/m"

markvader commented 2 years ago

Completed, also converted mbar to bar

markvader commented 2 years ago

One issue did arise when I changed the default water flow units from millilitres to litres.

The Home Assistant "recorder" cannot cope with storing two different units for one sensor.

This will only apply to those who installed in the first 6 hours of the integrations availability, prior to this commit

To fix so that these valves can be stored in future, go to https://my.home-assistant.io/redirect/developer_statistics or manually go to the developer tools menu / Statistics tab. Then search for "water flow" or "litres", then click on the fix link in the issues column, then delete all old values. If the fix link isn't present then this is not an issue for you.

Any rogue (high) values should disappear from history graphs in a day or so.