Wink AC and addidtional sensor support (#5670)
* Added door bell sensors * Initial support for AC units. * Added new device service * Quirky Aros AC unit support * Use super() everywhere and error checking for token request. * Ignore camera sensors during setup of alarms. * Added manufacturer/device attributes to all wink devices. * Fixed style errors * Fixed remaining lint errors.
This commit is contained in:
parent
b5f285a789
commit
80a794e587
11 changed files with 361 additions and 88 deletions
|
@ -9,7 +9,7 @@ import colorsys
|
|||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_RGB_COLOR, SUPPORT_BRIGHTNESS,
|
||||
SUPPORT_COLOR_TEMP, SUPPORT_RGB_COLOR, Light)
|
||||
from homeassistant.components.wink import WinkDevice
|
||||
from homeassistant.components.wink import WinkDevice, DOMAIN
|
||||
from homeassistant.util import color as color_util
|
||||
from homeassistant.util.color import \
|
||||
color_temperature_mired_to_kelvin as mired_to_kelvin
|
||||
|
@ -23,7 +23,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
"""Setup the Wink lights."""
|
||||
import pywink
|
||||
|
||||
add_devices(WinkLight(light, hass) for light in pywink.get_light_bulbs())
|
||||
for light in pywink.get_light_bulbs():
|
||||
_id = light.object_id() + light.name()
|
||||
if _id not in hass.data[DOMAIN]['unique_ids']:
|
||||
add_devices([WinkLight(light, hass)])
|
||||
|
||||
|
||||
class WinkLight(WinkDevice, Light):
|
||||
|
@ -31,7 +34,7 @@ class WinkLight(WinkDevice, Light):
|
|||
|
||||
def __init__(self, wink, hass):
|
||||
"""Initialize the Wink device."""
|
||||
WinkDevice.__init__(self, wink, hass)
|
||||
super().__init__(wink, hass)
|
||||
|
||||
@property
|
||||
def is_on(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue