Add basic support for Tradfri switches (#17007)

* Initial commit

* Sockets have been moved to separate component

* Sockets have been moved to separate component

* Fix const PLATFORM_SCHEMA

* Fix unique id

* Fix async_create_task

* Fix PLATFORM_SCHEMA

* Fix typo

* Remove pylint disable
This commit is contained in:
Patrik authored and Fabian Affolter committed 2018-09-30 22:22:07 +02:00
1 parent 0a2b266742
commit 940d5fb2ee
5 files changed
+145 -4

No files matched your search

+2 -1
View File
@@ -26,7 +26,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
devices_commands = await api(gateway.get_devices())
all_devices = await api(devices_commands)
devices = (dev for dev in all_devices if not dev.has_light_control)
devices = (dev for dev in all_devices if not dev.has_light_control and
not dev.has_socket_control)
async_add_entities(TradfriDevice(device, api) for device in devices)