hacs-hubitat
hacs-hubitat copied to clipboard
[enhancement] Supporting more Cover options (Shutters, Curtains, etc.)
Supporting more Cover options like Roller Shutters, Curtains, etc.
What kind of support are you looking for? I mean, do you have Hubitat cover devices that aren't supported yet?
In the Readme it mentions that there is a Cover support for the following: door controller garage door controller window shade
But there are many more Cover types (https://www.home-assistant.io/integrations/cover/), Does it also support Curtain or Shutter devices?
The goal is to support the same devices as Hubitat, which doesn’t natively support everything HA does.
Would it be sufficient to allow you to select a specific device type for a Cover? I mean, the integration couldn’t provide any special functionality not supported by Hubitat, but it might at least show a more fitting icon in HA for particular entities.
I actually don't have the integration yet, my hub is on the way. But i was looking for Fibaro Roller Shutter which supports opening by parentage, and I was wondering if it would work with this HA-Hubitat integration - Do you think it will wokr?
And thanks a lot for responding, I really appreciate it.
Stale issue message
What kind of support are you looking for? I mean, do you have Hubitat cover devices that aren't supported yet?
I know this is an old enhancement request, but building upon it: There appears to be a STOP command missing in my setup.
On Hubitat I have a Somfy MyLink integration. When I share those device over to HA, It Does Work(tm): I can successfully issue OPEN and CLOSE commands to the shared entity, as well as the ability to request a specific position of the entity. The component I'm missing is a STOP command. With a Somfy MyLink integration, a STOP must be sent to stop the motor when using an OPEN or CLOSE command. Otherwise they will go up to 100% or down to 0%.
Here's what the Maker API serves up when hitting the Get Device Info URL on the Hubitat side -- I do see both a stop and a stopPositionChange:
{
"id": "7593",
"name": "Somfy MyLink Shade",
"label": "1F Great Room Blinds Hubitat",
"type": "Somfy MyLink Shade",
"room": null,
"attributes": [{
"name": "position",
"currentValue": 25,
"dataType": "NUMBER"
}, {
"name": "windowShade",
"currentValue": "partially open",
"dataType": "ENUM",
"values": ["opening", "partially open", "closed", "open", "closing", "unknown"]
}],
"capabilities": ["WindowShade", {
"attributes": [{
"name": "windowShade",
"dataType": null
}, {
"name": "position",
"dataType": null
}]
}],
"commands": ["close", "open", "setPosition", "startPositionChange", "stop", "stopPositionChange"]
}
Here's what the HA Dashboard/Lovelace looks like on the HA side:

Lastly, here's what HA Developer Options' States of the entity (trimmed for brevity, short version is they all show supported_features: 7:

When I manually change one of the entities to supported_features: 15, I do get the STOP command:

Insights welcomed!
It's old (because I'm slow), but it never hurts to show that it's still desirable. 😄
I think I was initially focusing on garage doors with that one, and in the Hubitat device capabilities docs garage door controls don't have a "stop" command. But yeah, there are a wider range of capabilities that should be supported, like "stop" and setting a specific position.
The entity needs to be updated to support the current CoverEntity API, and additional commands could be added at that point.
Thanks for the input. I saw it already being detected as a window shade, so I was able to get this working with the following modifications:
ADDED
async def async_stop_cover(self, **kwargs: Any) -> None:
"""Stop the cover."""
_LOGGER.warn("Stopping %s", self.name)
await self.send_command("stop")
MODIFIED self._features under HubitatWindowShade(HubitatCover):
self._features = SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_SET_POSITION | SUPPORT_STOP
MODIFIED homeassistant.components.cover import:
from homeassistant.components.cover import (
ATTR_POSITION as HA_ATTR_POSITION,
DEVICE_CLASS_DOOR,
DEVICE_CLASS_GARAGE,
DEVICE_CLASS_SHADE,
SUPPORT_CLOSE,
SUPPORT_OPEN,
SUPPORT_SET_POSITION,
SUPPORT_STOP,
CoverEntity,
)
Thanks again for the pointer.