From 14e0dde05569172593d17eac1f5d972954e5839f Mon Sep 17 00:00:00 2001 From: shred86 <32663154+shred86@users.noreply.github.com> Date: Sat, 8 Feb 2020 07:58:07 -0800 Subject: [PATCH] Add Abode water valve support (#30635) --- homeassistant/components/abode/switch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/abode/switch.py b/homeassistant/components/abode/switch.py index bbe3f01f488..d6773e10ca1 100644 --- a/homeassistant/components/abode/switch.py +++ b/homeassistant/components/abode/switch.py @@ -11,6 +11,8 @@ from .const import DOMAIN _LOGGER = logging.getLogger(__name__) +DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE] + async def async_setup_entry(hass, config_entry, async_add_entities): """Set up Abode switch devices.""" @@ -18,8 +20,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(