core/homeassistant/components/light/insteon_hub.py

19 lines
626 B
Python
Raw Normal View History

2016-01-19 13:10:17 +00:00
"""
homeassistant.components.light.insteon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for Insteon Hub lights.
"""
2016-01-29 05:37:08 +00:00
from homeassistant.components.insteon_hub import (INSTEON, InsteonToggleDevice)
2016-01-19 13:10:17 +00:00
def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the Insteon Hub light platform. """
devs = []
for device in INSTEON.devices:
if device.DeviceCategory == "Switched Lighting Control":
devs.append(InsteonToggleDevice(device))
if device.DeviceCategory == "Dimmable Lighting Control":
devs.append(InsteonToggleDevice(device))
2016-01-19 13:10:17 +00:00
add_devices(devs)