From b1736994b72a90ff18d7461b0afe00dd93ba2cdc Mon Sep 17 00:00:00 2001 From: pvizeli Date: Wed, 8 Mar 2017 17:57:22 +0100 Subject: [PATCH] fix lint --- homeassistant/components/android_ip_webcam.py | 2 +- homeassistant/components/binary_sensor/android_ip_webcam.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/android_ip_webcam.py b/homeassistant/components/android_ip_webcam.py index d90232a87d0..b51045be3d9 100644 --- a/homeassistant/components/android_ip_webcam.py +++ b/homeassistant/components/android_ip_webcam.py @@ -258,7 +258,7 @@ class AndroidIPCamEntity(Entity): def device_state_attributes(self): """Return the state attributes.""" state_attr = {} - if self._ipcam.status_data is not None: + if self._ipcam.status_data is None: return state_attr state_attr[ATTR_VID_CONNS] = \ diff --git a/homeassistant/components/binary_sensor/android_ip_webcam.py b/homeassistant/components/binary_sensor/android_ip_webcam.py index 2feb21f2ec5..ff193316439 100644 --- a/homeassistant/components/binary_sensor/android_ip_webcam.py +++ b/homeassistant/components/binary_sensor/android_ip_webcam.py @@ -50,9 +50,10 @@ class IPWebcamBinarySensor(AndroidIPCamEntity, BinarySensorDevice): """True if the binary sensor is on.""" return self._state - def update(self): + @asyncio.coroutine + def async_update(self): """Retrieve latest state.""" - if self._ipcam.status_data not None: + if self._ipcam.status_data is None: return container = self._ipcam.sensor_data.get(self._sensor)