Skip to content

Commit

Permalink
Fix data_key of the xiaomi_aqara cover for LAN protocol v2 (home-assi…
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi authored and awarecan committed Mar 26, 2019
1 parent 79445a7 commit 6fa8fdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion homeassistant/components/xiaomi_aqara/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 6fa8fdf

Please sign in to comment.