Add new mobile_app webhook command: get_zones (#22604)
## Description: Adds a new `mobile_app` webhook command, `get_zones`, which just returns all zones. ## Checklist: - [x] The code change is tested and works locally. - [x] Local tests pass with `tox`. **Your PR cannot be merged unless tests pass** - [x] There is no commented out code in this PR.
This commit is contained in:
parent
734a67ede0
commit
7bd8c0d39a
5 changed files with 55 additions and 15 deletions
|
@ -14,7 +14,7 @@ from .const import CONF_PASSIVE, DOMAIN, HOME_ZONE
|
|||
|
||||
@callback
|
||||
def configured_zones(hass):
|
||||
"""Return a set of the configured hosts."""
|
||||
"""Return a set of the configured zones."""
|
||||
return set((slugify(entry.data[CONF_NAME])) for
|
||||
entry in hass.config_entries.async_entries(DOMAIN))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue