Fix error on empty UOM for ISY994 Climate Device (#36454)
parent
f170c80bea
commit
04231bcb54
|
@ -133,7 +133,7 @@ class ISYThermostatEntity(ISYNodeEntity, ClimateEntity):
|
|||
# Which state values used depends on the mode property's UOM:
|
||||
uom = hvac_mode.uom
|
||||
# Handle special case for ISYv4 Firmware:
|
||||
if uom == UOM_ISYV4_NONE:
|
||||
if uom in (UOM_ISYV4_NONE, ""):
|
||||
uom = (
|
||||
UOM_HVAC_MODE_INSTEON
|
||||
if self._node.protocol == PROTO_INSTEON
|
||||
|
|
|
@ -83,8 +83,8 @@ class ISYCoverEntity(ISYNodeEntity, CoverEntity):
|
|||
|
||||
def set_cover_position(self, **kwargs):
|
||||
"""Move the cover to a specific position."""
|
||||
position = kwargs.get(ATTR_POSITION)
|
||||
if position and self._node.uom == UOM_8_BIT_RANGE:
|
||||
position = kwargs[ATTR_POSITION]
|
||||
if self._node.uom == UOM_8_BIT_RANGE:
|
||||
position = int(position * 255 / 100)
|
||||
if not self._node.turn_on(val=position):
|
||||
_LOGGER.error("Unable to set cover position")
|
||||
|
|
Loading…
Reference in New Issue