This commit is contained in:
pvizeli 2017-03-08 17:57:22 +01:00
parent 21feff5fd8
commit b1736994b7
2 changed files with 4 additions and 3 deletions

View file

@ -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] = \

View file

@ -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)