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)