jordanruthe / homeassistant-phyn

A plugin for Phyn and Phyn by Kohler for HomeAssistant
13 stars 3 forks source link

[REQUEST] Make use of the new valve entity, device class, and valve control services? #19

Closed Hedda closed 10 months ago

Hedda commented 10 months ago

Please consider implementing the use of the new valve entity to present shutoff valves as OPEN/CLOSE "valve" instead of as an ON/OFF "switch":

https://www.home-assistant.io/integrations/valve/

https://www.home-assistant.io/integrations/valve/#device-class

https://www.home-assistant.io/integrations/valve/#valve-control-services

https://www.home-assistant.io/integrations/valve/#service-valveset_position

This device type in Home Assistant is meant to provide a clearer defined interface to control valves such as water, gas, or air valves.

This might be a breaking change but not a huge change and it could be worth it to have a more properly suited device class.

If supported in then users can at least manually modify any switch device type that controls a valve device type and device class so it is presented as a valve by changing it to valve in the customize section of the UI or device config in configuration.yaml:

https://www.home-assistant.io/docs/configuration/customizing-devices/

Initially this new valve entity so far support the following device classes:

Anyway, this new valve entity, device class, and valve control services for use were added in Home Assistant 2024.1

https://www.home-assistant.io/blog/2024/01/03/release-20241/#new-entity-type-valve

Added by cibernox as entity type and device type for valves, which can be used by integrations to expose different type of valves.

New entity type: Valve

A brand new entity type has been added to Home Assistant: Valve!

Integrations can use this entity type to expose valves, such as a valve on a radiator, pool, sprinkler system, and main house gas or water line.

image

Currently, the Shelly integration supports it and now provides a valve entity for the Valve addon for Shelly Gas AddOn Manipulator. Additionally, support for it has been added to MQTT, and the valve entities also work with Amazon Alexa and Google Assistant.

Tip: Do you have a switch entity that controls a valve? You can now change the entity type to valve in the entity settings.

Hedda commented 10 months ago

Currently, the Shelly integration supports it and now provides a valve entity for the Valve addon for Shelly Gas AddOn Manipulator. Additionally, support for it has been added to MQTT, and the valve entities also work with Amazon Alexa and Google Assistant.

By the way, since the blog post other integrations have implemented it to, including allowing toggle of valve via Google Assistant:

https://github.com/home-assistant/core/pulls?q=is%3Apr+valve+

FYI, for reference please also see "water" for other integrations that use it (or should use this as well as other similar sensors):

https://www.home-assistant.io/docs/energy/water/

We have the following integrations available for existing products that can provide information about water usage:

jordanruthe commented 10 months ago

This started using the valve entity with c3107d6