mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-08 09:56:30 +00:00
Tweak
This commit is contained in:
parent
f03dc5bb36
commit
cfd99affa5
@ -29,7 +29,8 @@ Minimum change is to simply adjust the decorator
|
|||||||
# Old
|
# Old
|
||||||
# def register_services(hass: HomeAssistant) -> None:
|
# def register_services(hass: HomeAssistant) -> None:
|
||||||
# @verify_domain_control(hass, DOMAIN)
|
# @verify_domain_control(hass, DOMAIN)
|
||||||
# async def do_action(hass: HomeAssistant, call: ServiceCall) -> None:
|
# async def do_action(call: ServiceCall) -> None:
|
||||||
|
# entries = hass.config_entries.async_entries(DOMAIN)
|
||||||
# ...
|
# ...
|
||||||
# hass.services.async_register(...)
|
# hass.services.async_register(...)
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ Minimum change is to simply adjust the decorator
|
|||||||
def register_services(hass: HomeAssistant) -> None:
|
def register_services(hass: HomeAssistant) -> None:
|
||||||
@verify_domain_entity_control(DOMAIN)
|
@verify_domain_entity_control(DOMAIN)
|
||||||
async def do_action(call: ServiceCall) -> None:
|
async def do_action(call: ServiceCall) -> None:
|
||||||
|
entries = hass.config_entries.async_entries(DOMAIN)
|
||||||
...
|
...
|
||||||
|
|
||||||
hass.services.async_register(...)
|
hass.services.async_register(...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user