Skip to content

Commit

Permalink
magnet state change
Browse files Browse the repository at this point in the history
Status « open » -> state True
  • Loading branch information
fooxy committed Dec 21, 2016
1 parent da8cd25 commit f915881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/binary_sensor/aqara.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, aqaraGateway,deviceName,deviceSID,deviceModel,deviceData):

status = deviceData['status']
if deviceModel == 'magnet':
if status =='close':
if status =='open':
self._state = True
else:
self._state = False
Expand Down Expand Up @@ -85,7 +85,7 @@ def is_on(self):

def pushUpdate(self,model,status):
if model == 'magnet':
if status =='close':
if status =='open':
self._state = True
else:
self._state = False
Expand Down

0 comments on commit f915881

Please sign in to comment.