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 tests
This commit is contained in:
parent
6c4a6568f5
commit
28db0cebf0
4 changed files with 9 additions and 5 deletions
|
@ -32,7 +32,11 @@ class InsteonCoverEntity(InsteonEntity, CoverEntity):
|
||||||
@property
|
@property
|
||||||
def current_cover_position(self):
|
def current_cover_position(self):
|
||||||
"""Return the current cover position."""
|
"""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
|
@property
|
||||||
def supported_features(self):
|
def supported_features(self):
|
||||||
|
@ -59,5 +63,5 @@ class InsteonCoverEntity(InsteonEntity, CoverEntity):
|
||||||
await self._insteon_device.async_close()
|
await self._insteon_device.async_close()
|
||||||
else:
|
else:
|
||||||
await self._insteon_device.async_open(
|
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_LeakSensor: {BINARY_SENSOR: [2, 4]},
|
||||||
SecurityHealthSafety_MotionSensor: {BINARY_SENSOR: [1, 2, 3], ON_OFF_EVENTS: [1]},
|
SecurityHealthSafety_MotionSensor: {BINARY_SENSOR: [1, 2, 3], ON_OFF_EVENTS: [1]},
|
||||||
SecurityHealthSafety_OpenCloseSensor: {BINARY_SENSOR: [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]},
|
SensorsActuators_IOLink: {SWITCH: [1], BINARY_SENSOR: [2], ON_OFF_EVENTS: [1, 2]},
|
||||||
SwitchedLightingControl: {SWITCH: [1], ON_OFF_EVENTS: [1]},
|
SwitchedLightingControl: {SWITCH: [1], ON_OFF_EVENTS: [1]},
|
||||||
SwitchedLightingControl_ApplianceLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]},
|
SwitchedLightingControl_ApplianceLinc: {SWITCH: [1], ON_OFF_EVENTS: [1]},
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
"domain": "insteon",
|
"domain": "insteon",
|
||||||
"name": "Insteon",
|
"name": "Insteon",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/insteon",
|
"documentation": "https://www.home-assistant.io/integrations/insteon",
|
||||||
"requirements": ["pyinsteon==1.0.0"],
|
"requirements": ["pyinsteon==1.0.1"],
|
||||||
"codeowners": ["@teharris1"]
|
"codeowners": ["@teharris1"]
|
||||||
}
|
}
|
|
@ -1375,7 +1375,7 @@ pyialarm==0.3
|
||||||
pyicloud==0.9.7
|
pyicloud==0.9.7
|
||||||
|
|
||||||
# homeassistant.components.insteon
|
# homeassistant.components.insteon
|
||||||
pyinsteon==1.0.0
|
pyinsteon==1.0.1
|
||||||
|
|
||||||
# homeassistant.components.intesishome
|
# homeassistant.components.intesishome
|
||||||
pyintesishome==1.7.4
|
pyintesishome==1.7.4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue