deCONZ - Retry on BridgeBusy errors (#23436)
parent
df9a9a1fec
commit
6e34015420
|
@ -88,9 +88,11 @@ class DeconzCover(DeconzDevice, CoverDevice):
|
|||
"""Move the cover to a specific position."""
|
||||
position = kwargs[ATTR_POSITION]
|
||||
data = {'on': False}
|
||||
|
||||
if position > 0:
|
||||
data['on'] = True
|
||||
data['bri'] = int(position / 100 * 255)
|
||||
|
||||
await self._device.async_set_state(data)
|
||||
|
||||
async def async_open_cover(self, **kwargs):
|
||||
|
@ -126,7 +128,9 @@ class DeconzCoverZigbeeSpec(DeconzCover):
|
|||
"""Move the cover to a specific position."""
|
||||
position = kwargs[ATTR_POSITION]
|
||||
data = {'on': False}
|
||||
|
||||
if position < 100:
|
||||
data['on'] = True
|
||||
data['bri'] = 255 - int(position / 100 * 255)
|
||||
|
||||
await self._device.async_set_state(data)
|
||||
|
|
|
@ -61,8 +61,10 @@ class DeconzDevice(Entity):
|
|||
if (self._device.uniqueid is None or
|
||||
self._device.uniqueid.count(':') != 7):
|
||||
return None
|
||||
|
||||
serial = self._device.uniqueid.split('-', 1)[0]
|
||||
bridgeid = self.gateway.api.config.bridgeid
|
||||
|
||||
return {
|
||||
'connections': {(CONNECTION_ZIGBEE, serial)},
|
||||
'identifiers': {(DECONZ_DOMAIN, serial)},
|
||||
|
|
|
@ -165,6 +165,8 @@ class DeconzLight(DeconzDevice, Light):
|
|||
"""Return the device state attributes."""
|
||||
attributes = {}
|
||||
attributes['is_deconz_group'] = self._device.type == 'LightGroup'
|
||||
|
||||
if self._device.type == 'LightGroup':
|
||||
attributes['all_on'] = self._device.all_on
|
||||
|
||||
return attributes
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Deconz",
|
||||
"documentation": "https://www.home-assistant.io/components/deconz",
|
||||
"requirements": [
|
||||
"pydeconz==55"
|
||||
"pydeconz==58"
|
||||
],
|
||||
"dependencies": [],
|
||||
"codeowners": [
|
||||
|
|
|
@ -1018,7 +1018,7 @@ pydaikin==1.4.0
|
|||
pydanfossair==0.1.0
|
||||
|
||||
# homeassistant.components.deconz
|
||||
pydeconz==55
|
||||
pydeconz==58
|
||||
|
||||
# homeassistant.components.zwave
|
||||
pydispatcher==2.0.5
|
||||
|
|
|
@ -223,7 +223,7 @@ pyHS100==0.3.5
|
|||
pyblackbird==0.5
|
||||
|
||||
# homeassistant.components.deconz
|
||||
pydeconz==55
|
||||
pydeconz==58
|
||||
|
||||
# homeassistant.components.zwave
|
||||
pydispatcher==2.0.5
|
||||
|
|
Loading…
Reference in New Issue