hacs-hubitat icon indicating copy to clipboard operation
hacs-hubitat copied to clipboard

Entity for controlling valve was not created

Open tj335 opened this issue 3 years ago • 3 comments

The only entities that were created in Home Assistant for this device was for the temperature and the water sensor. There’s no entity for controlling the valve. Here are the device details:

{
    "id": "1389",
    "name": "Zooz ZAC36 Ball Valve Controller",
    "label": "Main Water Shutoff",
    "type": "Zooz ZAC36 Ball Valve Controller",
    "attributes": [
        {
            "name": "temperature",
            "currentValue": 72.9,
            "dataType": "NUMBER"
        },
        {
            "name": "water",
            "currentValue": "dry",
            "dataType": "ENUM",
            "values": [
                "wet",
                "dry"
            ]
        },
        {
            "name": "valve",
            "currentValue": "open",
            "dataType": "ENUM",
            "values": [
                "open",
                "closed"
            ]
        }
    ],
    "capabilities": [
        "WaterSensor",
        {
            "attributes": [
                {
                    "name": "water",
                    "dataType": null
                }
            ]
        },
        "Configuration",
        "Refresh",
        "Valve",
        {
            "attributes": [
                {
                    "name": "valve",
                    "dataType": null
                }
            ]
        },
        "TemperatureMeasurement",
        {
            "attributes": [
                {
                    "name": "temperature",
                    "dataType": null
                }
            ]
        }
    ],
    "commands": [
        "close",
        "configure",
        "open",
        "refresh"
    ]
}

tj335 avatar May 28 '22 00:05 tj335

The integration doesn't yet handle water valves.

From the docs it looks like a valve just supports open and close commands. Home Assistant doesn't have a "water valve" device type (that I'm aware of), but it could be modeled as a simple switch, or maybe a light control if it can be partially opened or closed.

jason0x43 avatar Jun 01 '22 03:06 jason0x43

You should be able to test it using the send_command Hubitat service.

  1. Open the Services tab in Developer Tools in Hubitat.
  2. Choose the "Hubitat: send_command" service
  3. For the entity, just choose any one of the entities that were created for the valve device
  4. For the command, put "open"
  5. Click call service

jason0x43 avatar Jun 01 '22 03:06 jason0x43

Thanks for getting back to me. I thought the valve was implemented after I searched on the community site thread, sorry for the confusion. As a workaround I created a virtual switch in Hubitat and exposed that to HA. Then I have a rule in Hubitat to control the valve based on the virtual switch. Calling the service as you described worked.

tj335 avatar Jun 01 '22 03:06 tj335