Fix data_key of the xiaomi_aqara cover for LAN protocol v2 (#22358)
parent
79445a7ccc
commit
6fa8fdf555
|
@ -17,8 +17,12 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
for device in gateway.devices['cover']:
|
||||
model = device['model']
|
||||
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",
|
||||
'status', gateway))
|
||||
data_key, gateway))
|
||||
add_entities(devices)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue