Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Home Assistant device class for flow rates (e.g., Sonoff SWV) #26035

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

tathamoddie
Copy link
Contributor

@tathamoddie tathamoddie commented Jan 28, 2025

Supports devices like the SONOFF SWV (Smart Water Valve), which has an entity called Flow, with units of m³/h.

Adding the device class makes it easier to natively convert this value to other units, like L/min.

This change is aligned with lib/modernExtend.flow, which has a unit of m³/h.

It won't cover the Neo NAS-WV03B device, as it exposes an entity called water_current instead. I don't know how best to handle this scenario -- renaming it to flow would impact users of that device, but it also doesn't look like a go-forward name so it doesn't seem sensible to add water_current to the HA mappings. (And "water current" is funny wording in the first place.)

I couldn't find any other devices exposing a water flow rate.

@tathamoddie tathamoddie marked this pull request as ready for review January 28, 2025 04:05
@tathamoddie tathamoddie changed the title Add Home Assistance device class for flow rates (like Sonoff SWV) Add Home Assistant device class for flow rates (like Sonoff SWV) Jan 28, 2025
@tathamoddie tathamoddie changed the title Add Home Assistant device class for flow rates (like Sonoff SWV) Add Home Assistant device class for flow rates (e.g., Sonoff SWV) Jan 28, 2025
@Koenkk Koenkk merged commit cdbd553 into Koenkk:dev Jan 28, 2025
11 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Jan 28, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants