Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions homeassistant/components/abode/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

_LOGGER = logging.getLogger(__name__)

DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE]


async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Platform uses config entry setup."""
Expand All @@ -23,8 +25,9 @@ async def async_setup_entry(hass, config_entry, async_add_entities):

entities = []

for device in data.abode.get_devices(generic_type=CONST.TYPE_SWITCH):
entities.append(AbodeSwitch(data, device))
for device_type in DEVICE_TYPES:
for device in data.abode.get_devices(generic_type=device_type):
entities.append(AbodeSwitch(data, device))

for automation in data.abode.get_automations(generic_type=CONST.TYPE_AUTOMATION):
entities.append(
Expand Down