2016-01-19 13:10:17 +00:00
|
|
|
"""
|
|
|
|
Support for Insteon Hub lights.
|
|
|
|
|
2016-03-07 21:08:21 +00:00
|
|
|
For more details about this platform, please refer to the documentation at
|
|
|
|
https://home-assistant.io/components/insteon_hub/
|
|
|
|
"""
|
2016-02-19 05:27:50 +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):
|
2016-03-07 21:08:21 +00:00
|
|
|
"""Setup the Insteon Hub light platform."""
|
2016-01-19 13:10:17 +00:00
|
|
|
devs = []
|
|
|
|
for device in INSTEON.devices:
|
|
|
|
if device.DeviceCategory == "Switched Lighting Control":
|
|
|
|
devs.append(InsteonToggleDevice(device))
|
2016-01-29 04:36:40 +00:00
|
|
|
if device.DeviceCategory == "Dimmable Lighting Control":
|
|
|
|
devs.append(InsteonToggleDevice(device))
|
2016-01-19 13:10:17 +00:00
|
|
|
add_devices(devs)
|