ISY994 remove value when calling open cover with no position (#92036)

This commit is contained in:
shbatm 2023-04-25 18:17:11 -05:00 committed by GitHub
parent 969db343bd
commit da05763a5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import _LOGGER, DOMAIN, UOM_8_BIT_RANGE, UOM_BARRIER from .const import _LOGGER, DOMAIN, UOM_8_BIT_RANGE
from .entity import ISYNodeEntity, ISYProgramEntity from .entity import ISYNodeEntity, ISYProgramEntity
@ -63,8 +63,7 @@ class ISYCoverEntity(ISYNodeEntity, CoverEntity):
async def async_open_cover(self, **kwargs: Any) -> None: async def async_open_cover(self, **kwargs: Any) -> None:
"""Send the open cover command to the ISY cover device.""" """Send the open cover command to the ISY cover device."""
val = 100 if self._node.uom == UOM_BARRIER else None if not await self._node.turn_on():
if not await self._node.turn_on(val=val):
_LOGGER.error("Unable to open the cover") _LOGGER.error("Unable to open the cover")
async def async_close_cover(self, **kwargs: Any) -> None: async def async_close_cover(self, **kwargs: Any) -> None: