Fix Insteon cover and smoke detector entities (#35810)
* Bump pyinsteon to 1.0.1 * Fix cover open/close calls * Add smokebridge sensors * trigger tests * trigger testspull/35818/head
parent
6c4a6568f5
commit
28db0cebf0
|
@ -32,7 +32,11 @@ class InsteonCoverEntity(InsteonEntity, CoverEntity):
|
|||
@property
|
||||
def current_cover_position(self):
|
||||
"""Return the current cover position."""
|
||||
return int(math.ceil(self._insteon_device_group.value * 100 / 255))
|
||||
if self._insteon_device_group.value is not None:
|
||||
pos = self._insteon_device_group.value
|
||||
else:
|
||||
pos = 0
|
||||
return int(math.ceil(pos * 100 / 255))
|
||||
|
||||
@property
|
||||
def supported_features(self):
|
||||
|
@ -59,5 +63,5 @@ class InsteonCoverEntity(InsteonEntity, CoverEntity):
|
|||
await self._insteon_device.async_close()
|
||||
else:
|
||||
await self._insteon_device.async_open(
|
||||
position=position, group=self._insteon_device_group.group
|
||||
open_level=position, group=self._insteon_device_group.group
|
||||
)
|
||||
|
|
|
@ -77,7 +77,7 @@ DEVICE_PLATFORM = {
|
|||
SecurityHealthSafety_LeakSensor: {BINARY_SENSOR: [2, 4]},
|
||||
SecurityHealthSafety_MotionSensor: {BINARY_SENSOR: [1, 2, 3], ON_OFF_EVENTS: [1]},
|
||||
SecurityHealthSafety_OpenCloseSensor: {BINARY_SENSOR: [1]},
|
||||
SecurityHealthSafety_Smokebridge: {BINARY_SENSOR: [1]},
|
||||
SecurityHealthSafety_Smokebridge: {BINARY_SENSOR: [1, 2, 3, 4, 6, 7]},
|
||||
SensorsActuators_IOLink: {SWITCH: [1], BINARY_SENSOR: [2], ON_OFF_EVENTS: [1, 2]},
|
||||
SwitchedLightingControl: {SWITCH: [1], ON_OFF_EVENTS: [1]},
|
||||
SwitchedLightingControl_ApplianceLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]},
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
"domain": "insteon",
|
||||
"name": "Insteon",
|
||||
"documentation": "https://www.home-assistant.io/integrations/insteon",
|
||||
"requirements": ["pyinsteon==1.0.0"],
|
||||
"requirements": ["pyinsteon==1.0.1"],
|
||||
"codeowners": ["@teharris1"]
|
||||
}
|
|
@ -1375,7 +1375,7 @@ pyialarm==0.3
|
|||
pyicloud==0.9.7
|
||||
|
||||
# homeassistant.components.insteon
|
||||
pyinsteon==1.0.0
|
||||
pyinsteon==1.0.1
|
||||
|
||||
# homeassistant.components.intesishome
|
||||
pyintesishome==1.7.4
|
||||
|
|
Loading…
Reference in New Issue