pump version 0.3 / make a lot of improvments

This commit is contained in:
pvizeli committed 2017-03-09 12:00:50 +01:00
1 parent 21f3b62d09
commit bcd4def0ae
5 files changed
+53 -52

No files matched your search

@@ -6,7 +6,6 @@ https://home-assistant.io/components/switch.android_ip_webcam/
"""
import asyncio
from homeassistant.const import STATE_UNKNOWN
from homeassistant.components.switch import SwitchDevice
from homeassistant.components.android_ip_webcam import (
KEY_MAP, ICON_MAP, DATA_IP_WEBCAM, AndroidIPCamEntity, CONF_HOST,
@@ -54,10 +53,7 @@ class IPWebcamSettingsSwitch(AndroidIPCamEntity, SwitchDevice):
@asyncio.coroutine
def async_update(self):
"""Get the updated status of the switch."""
if self._ipcam.status_data is not None:
self._state = self._ipcam.current_settings.get(self._setting)
else:
self._state = STATE_UNKNOWN
self._state = bool(self._ipcam.current_settings.get(self._setting))
@property
def is_on(self):