From f915881853854dced551e2214362f8669397dff5 Mon Sep 17 00:00:00 2001 From: Rabir Date: Wed, 21 Dec 2016 12:38:15 +0100 Subject: [PATCH] magnet state change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Status « open » -> state True --- custom_components/binary_sensor/aqara.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/binary_sensor/aqara.py b/custom_components/binary_sensor/aqara.py index 7e5dd2c..1d3c1b8 100644 --- a/custom_components/binary_sensor/aqara.py +++ b/custom_components/binary_sensor/aqara.py @@ -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 @@ -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