mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add Abode water valve support (#30635)
This commit is contained in:
parent
967b02073e
commit
14e0dde055
@ -11,6 +11,8 @@ from .const import DOMAIN
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE]
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
"""Set up Abode switch devices."""
|
"""Set up Abode switch devices."""
|
||||||
@ -18,7 +20,8 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
|
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
for device in data.abode.get_devices(generic_type=CONST.TYPE_SWITCH):
|
for device_type in DEVICE_TYPES:
|
||||||
|
for device in data.abode.get_devices(generic_type=device_type):
|
||||||
entities.append(AbodeSwitch(data, device))
|
entities.append(AbodeSwitch(data, device))
|
||||||
|
|
||||||
for automation in data.abode.get_automations(generic_type=CONST.TYPE_AUTOMATION):
|
for automation in data.abode.get_automations(generic_type=CONST.TYPE_AUTOMATION):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user