mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Fix data_key of the xiaomi_aqara cover for LAN protocol v2 (#22358)
This commit is contained in:
parent
79445a7ccc
commit
6fa8fdf555
@ -17,8 +17,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
for device in gateway.devices['cover']:
|
for device in gateway.devices['cover']:
|
||||||
model = device['model']
|
model = device['model']
|
||||||
if model == 'curtain':
|
if model == 'curtain':
|
||||||
|
if 'proto' not in device or int(device['proto'][0:1]) == 1:
|
||||||
|
data_key = 'status'
|
||||||
|
else:
|
||||||
|
data_key = 'curtain_status'
|
||||||
devices.append(XiaomiGenericCover(device, "Curtain",
|
devices.append(XiaomiGenericCover(device, "Curtain",
|
||||||
'status', gateway))
|
data_key, gateway))
|
||||||
add_entities(devices)
|
add_entities(devices)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user