mirror of
https://github.com/home-assistant/core.git
synced 2025-04-30 04:07:51 +00:00
Update triggers to use HassJob (#41450)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
7537a3a7c8
commit
b51a160cce
@ -3,7 +3,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.components.geo_location import DOMAIN
|
from homeassistant.components.geo_location import DOMAIN
|
||||||
from homeassistant.const import CONF_EVENT, CONF_PLATFORM, CONF_SOURCE, CONF_ZONE
|
from homeassistant.const import CONF_EVENT, CONF_PLATFORM, CONF_SOURCE, CONF_ZONE
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
from homeassistant.helpers import condition, config_validation as cv
|
from homeassistant.helpers import condition, config_validation as cv
|
||||||
from homeassistant.helpers.config_validation import entity_domain
|
from homeassistant.helpers.config_validation import entity_domain
|
||||||
from homeassistant.helpers.event import TrackStates, async_track_state_change_filtered
|
from homeassistant.helpers.event import TrackStates, async_track_state_change_filtered
|
||||||
@ -36,6 +36,7 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
source = config.get(CONF_SOURCE).lower()
|
source = config.get(CONF_SOURCE).lower()
|
||||||
zone_entity_id = config.get(CONF_ZONE)
|
zone_entity_id = config.get(CONF_ZONE)
|
||||||
trigger_event = config.get(CONF_EVENT)
|
trigger_event = config.get(CONF_EVENT)
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def state_change_listener(event):
|
def state_change_listener(event):
|
||||||
@ -58,8 +59,8 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
and from_match
|
and from_match
|
||||||
and not to_match
|
and not to_match
|
||||||
):
|
):
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "geo_location",
|
"platform": "geo_location",
|
||||||
|
@ -4,7 +4,7 @@ import logging
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_PLATFORM
|
from homeassistant.const import CONF_PLATFORM
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
|
|
||||||
# mypy: allow-untyped-defs
|
# mypy: allow-untyped-defs
|
||||||
@ -58,6 +58,8 @@ async def async_attach_trigger(
|
|||||||
extra=vol.ALLOW_EXTRA,
|
extra=vol.ALLOW_EXTRA,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def handle_event(event):
|
def handle_event(event):
|
||||||
"""Listen for events and calls the action when data matches."""
|
"""Listen for events and calls the action when data matches."""
|
||||||
@ -72,8 +74,8 @@ async def async_attach_trigger(
|
|||||||
# If event doesn't match, skip event
|
# If event doesn't match, skip event
|
||||||
return
|
return
|
||||||
|
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": platform_type,
|
"platform": platform_type,
|
||||||
|
@ -4,7 +4,7 @@ import logging
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_EVENT, CONF_PLATFORM, EVENT_HOMEASSISTANT_STOP
|
from homeassistant.const import CONF_EVENT, CONF_PLATFORM, EVENT_HOMEASSISTANT_STOP
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
|
|
||||||
# mypy: allow-untyped-defs
|
# mypy: allow-untyped-defs
|
||||||
|
|
||||||
@ -23,14 +23,15 @@ TRIGGER_SCHEMA = vol.Schema(
|
|||||||
async def async_attach_trigger(hass, config, action, automation_info):
|
async def async_attach_trigger(hass, config, action, automation_info):
|
||||||
"""Listen for events based on configuration."""
|
"""Listen for events based on configuration."""
|
||||||
event = config.get(CONF_EVENT)
|
event = config.get(CONF_EVENT)
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
if event == EVENT_SHUTDOWN:
|
if event == EVENT_SHUTDOWN:
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def hass_shutdown(event):
|
def hass_shutdown(event):
|
||||||
"""Execute when Home Assistant is shutting down."""
|
"""Execute when Home Assistant is shutting down."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "homeassistant",
|
"platform": "homeassistant",
|
||||||
@ -46,8 +47,8 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
# Automation are enabled while hass is starting up, fire right away
|
# Automation are enabled while hass is starting up, fire right away
|
||||||
# Check state because a config reload shouldn't trigger it.
|
# Check state because a config reload shouldn't trigger it.
|
||||||
if automation_info["home_assistant_start"]:
|
if automation_info["home_assistant_start"]:
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "homeassistant",
|
"platform": "homeassistant",
|
||||||
|
@ -13,7 +13,7 @@ from homeassistant.const import (
|
|||||||
CONF_PLATFORM,
|
CONF_PLATFORM,
|
||||||
CONF_VALUE_TEMPLATE,
|
CONF_VALUE_TEMPLATE,
|
||||||
)
|
)
|
||||||
from homeassistant.core import CALLBACK_TYPE, callback
|
from homeassistant.core import CALLBACK_TYPE, HassJob, callback
|
||||||
from homeassistant.helpers import condition, config_validation as cv, template
|
from homeassistant.helpers import condition, config_validation as cv, template
|
||||||
from homeassistant.helpers.event import (
|
from homeassistant.helpers.event import (
|
||||||
async_track_same_state,
|
async_track_same_state,
|
||||||
@ -73,6 +73,7 @@ async def async_attach_trigger(
|
|||||||
entities_triggered = set()
|
entities_triggered = set()
|
||||||
period: dict = {}
|
period: dict = {}
|
||||||
attribute = config.get(CONF_ATTRIBUTE)
|
attribute = config.get(CONF_ATTRIBUTE)
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
if value_template is not None:
|
if value_template is not None:
|
||||||
value_template.hass = hass
|
value_template.hass = hass
|
||||||
@ -106,8 +107,8 @@ async def async_attach_trigger(
|
|||||||
@callback
|
@callback
|
||||||
def call_action():
|
def call_action():
|
||||||
"""Call action with right context."""
|
"""Call action with right context."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": platform_type,
|
"platform": platform_type,
|
||||||
|
@ -7,7 +7,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant import exceptions
|
from homeassistant import exceptions
|
||||||
from homeassistant.const import CONF_ATTRIBUTE, CONF_FOR, CONF_PLATFORM, MATCH_ALL
|
from homeassistant.const import CONF_ATTRIBUTE, CONF_FOR, CONF_PLATFORM, MATCH_ALL
|
||||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, State, callback
|
from homeassistant.core import CALLBACK_TYPE, HassJob, HomeAssistant, State, callback
|
||||||
from homeassistant.helpers import config_validation as cv, template
|
from homeassistant.helpers import config_validation as cv, template
|
||||||
from homeassistant.helpers.event import (
|
from homeassistant.helpers.event import (
|
||||||
Event,
|
Event,
|
||||||
@ -83,6 +83,7 @@ async def async_attach_trigger(
|
|||||||
match_from_state = process_state_match(from_state)
|
match_from_state = process_state_match(from_state)
|
||||||
match_to_state = process_state_match(to_state)
|
match_to_state = process_state_match(to_state)
|
||||||
attribute = config.get(CONF_ATTRIBUTE)
|
attribute = config.get(CONF_ATTRIBUTE)
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def state_automation_listener(event: Event):
|
def state_automation_listener(event: Event):
|
||||||
@ -122,8 +123,8 @@ async def async_attach_trigger(
|
|||||||
@callback
|
@callback
|
||||||
def call_action():
|
def call_action():
|
||||||
"""Call action with right context."""
|
"""Call action with right context."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": platform_type,
|
"platform": platform_type,
|
||||||
|
@ -6,7 +6,7 @@ import logging
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_AT, CONF_PLATFORM
|
from homeassistant.const import CONF_AT, CONF_PLATFORM
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.event import (
|
from homeassistant.helpers.event import (
|
||||||
async_track_point_in_time,
|
async_track_point_in_time,
|
||||||
@ -37,12 +37,13 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
"""Listen for state changes based on configuration."""
|
"""Listen for state changes based on configuration."""
|
||||||
entities = {}
|
entities = {}
|
||||||
removes = []
|
removes = []
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def time_automation_listener(description, now):
|
def time_automation_listener(description, now):
|
||||||
"""Listen for time changes and calls action."""
|
"""Listen for time changes and calls action."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{"trigger": {"platform": "time", "now": now, "description": description}},
|
{"trigger": {"platform": "time", "now": now, "description": description}},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import logging
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_PLATFORM
|
from homeassistant.const import CONF_PLATFORM
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
from homeassistant.helpers.event import async_track_time_change
|
from homeassistant.helpers.event import async_track_time_change
|
||||||
|
|
||||||
@ -64,6 +64,7 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
hours = config.get(CONF_HOURS)
|
hours = config.get(CONF_HOURS)
|
||||||
minutes = config.get(CONF_MINUTES)
|
minutes = config.get(CONF_MINUTES)
|
||||||
seconds = config.get(CONF_SECONDS)
|
seconds = config.get(CONF_SECONDS)
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
# If larger units are specified, default the smaller units to zero
|
# If larger units are specified, default the smaller units to zero
|
||||||
if minutes is None and hours is not None:
|
if minutes is None and hours is not None:
|
||||||
@ -74,8 +75,8 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
@callback
|
@callback
|
||||||
def time_automation_listener(now):
|
def time_automation_listener(now):
|
||||||
"""Listen for time changes and calls action."""
|
"""Listen for time changes and calls action."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "time_pattern",
|
"platform": "time_pattern",
|
||||||
|
@ -4,7 +4,7 @@ import logging
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_PLATFORM
|
from homeassistant.const import CONF_PLATFORM
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.event import track_point_in_utc_time
|
from homeassistant.helpers.event import track_point_in_utc_time
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
@ -38,12 +38,13 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
held_less_than = config.get(CONF_HELD_LESS_THAN)
|
held_less_than = config.get(CONF_HELD_LESS_THAN)
|
||||||
pressed_time = None
|
pressed_time = None
|
||||||
cancel_pressed_more_than = None
|
cancel_pressed_more_than = None
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def call_action():
|
def call_action():
|
||||||
"""Call action with right context."""
|
"""Call action with right context."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
CONF_PLATFORM: "litejet",
|
CONF_PLATFORM: "litejet",
|
||||||
|
@ -5,7 +5,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant.components import mqtt
|
from homeassistant.components import mqtt
|
||||||
from homeassistant.const import CONF_PAYLOAD, CONF_PLATFORM
|
from homeassistant.const import CONF_PAYLOAD, CONF_PLATFORM
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
# mypy: allow-untyped-defs
|
# mypy: allow-untyped-defs
|
||||||
@ -35,6 +35,7 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
payload = config.get(CONF_PAYLOAD)
|
payload = config.get(CONF_PAYLOAD)
|
||||||
encoding = config[CONF_ENCODING] or None
|
encoding = config[CONF_ENCODING] or None
|
||||||
qos = config[CONF_QOS]
|
qos = config[CONF_QOS]
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def mqtt_automation_listener(mqttmsg):
|
def mqtt_automation_listener(mqttmsg):
|
||||||
@ -53,7 +54,7 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
hass.async_run_job(action, {"trigger": data})
|
hass.async_run_hass_job(job, {"trigger": data})
|
||||||
|
|
||||||
remove = await mqtt.async_subscribe(
|
remove = await mqtt.async_subscribe(
|
||||||
hass, topic, mqtt_automation_listener, encoding=encoding, qos=qos
|
hass, topic, mqtt_automation_listener, encoding=encoding, qos=qos
|
||||||
|
@ -10,7 +10,7 @@ from homeassistant.const import (
|
|||||||
CONF_PLATFORM,
|
CONF_PLATFORM,
|
||||||
SUN_EVENT_SUNRISE,
|
SUN_EVENT_SUNRISE,
|
||||||
)
|
)
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.event import async_track_sunrise, async_track_sunset
|
from homeassistant.helpers.event import async_track_sunrise, async_track_sunset
|
||||||
|
|
||||||
@ -34,12 +34,13 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
description = event
|
description = event
|
||||||
if offset:
|
if offset:
|
||||||
description = f"{description} with offset"
|
description = f"{description} with offset"
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def call_action():
|
def call_action():
|
||||||
"""Call action with right context."""
|
"""Call action with right context."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "sun",
|
"platform": "sun",
|
||||||
|
@ -5,7 +5,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
from homeassistant import exceptions
|
from homeassistant import exceptions
|
||||||
from homeassistant.const import CONF_FOR, CONF_PLATFORM, CONF_VALUE_TEMPLATE
|
from homeassistant.const import CONF_FOR, CONF_PLATFORM, CONF_VALUE_TEMPLATE
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
from homeassistant.helpers import config_validation as cv, template
|
from homeassistant.helpers import config_validation as cv, template
|
||||||
from homeassistant.helpers.event import (
|
from homeassistant.helpers.event import (
|
||||||
TrackTemplate,
|
TrackTemplate,
|
||||||
@ -36,6 +36,7 @@ async def async_attach_trigger(
|
|||||||
time_delta = config.get(CONF_FOR)
|
time_delta = config.get(CONF_FOR)
|
||||||
template.attach(hass, time_delta)
|
template.attach(hass, time_delta)
|
||||||
delay_cancel = None
|
delay_cancel = None
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def template_listener(event, updates):
|
def template_listener(event, updates):
|
||||||
@ -58,8 +59,8 @@ async def async_attach_trigger(
|
|||||||
@callback
|
@callback
|
||||||
def call_action(*_):
|
def call_action(*_):
|
||||||
"""Call action with right context."""
|
"""Call action with right context."""
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "template",
|
"platform": "template",
|
||||||
|
@ -6,7 +6,7 @@ from aiohttp import hdrs
|
|||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import CONF_PLATFORM, CONF_WEBHOOK_ID
|
from homeassistant.const import CONF_PLATFORM, CONF_WEBHOOK_ID
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
||||||
# mypy: allow-untyped-defs
|
# mypy: allow-untyped-defs
|
||||||
@ -20,7 +20,7 @@ TRIGGER_SCHEMA = vol.Schema(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def _handle_webhook(action, hass, webhook_id, request):
|
async def _handle_webhook(job, hass, webhook_id, request):
|
||||||
"""Handle incoming webhook."""
|
"""Handle incoming webhook."""
|
||||||
result = {"platform": "webhook", "webhook_id": webhook_id}
|
result = {"platform": "webhook", "webhook_id": webhook_id}
|
||||||
|
|
||||||
@ -31,17 +31,18 @@ async def _handle_webhook(action, hass, webhook_id, request):
|
|||||||
|
|
||||||
result["query"] = request.query
|
result["query"] = request.query
|
||||||
result["description"] = "webhook"
|
result["description"] = "webhook"
|
||||||
hass.async_run_job(action, {"trigger": result})
|
hass.async_run_hass_job(job, {"trigger": result})
|
||||||
|
|
||||||
|
|
||||||
async def async_attach_trigger(hass, config, action, automation_info):
|
async def async_attach_trigger(hass, config, action, automation_info):
|
||||||
"""Trigger based on incoming webhooks."""
|
"""Trigger based on incoming webhooks."""
|
||||||
webhook_id = config.get(CONF_WEBHOOK_ID)
|
webhook_id = config.get(CONF_WEBHOOK_ID)
|
||||||
|
job = HassJob(action)
|
||||||
hass.components.webhook.async_register(
|
hass.components.webhook.async_register(
|
||||||
automation_info["domain"],
|
automation_info["domain"],
|
||||||
automation_info["name"],
|
automation_info["name"],
|
||||||
webhook_id,
|
webhook_id,
|
||||||
partial(_handle_webhook, action),
|
partial(_handle_webhook, job),
|
||||||
)
|
)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
@ -8,7 +8,7 @@ from homeassistant.const import (
|
|||||||
CONF_PLATFORM,
|
CONF_PLATFORM,
|
||||||
CONF_ZONE,
|
CONF_ZONE,
|
||||||
)
|
)
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import HassJob, callback
|
||||||
from homeassistant.helpers import condition, config_validation as cv, location
|
from homeassistant.helpers import condition, config_validation as cv, location
|
||||||
from homeassistant.helpers.event import async_track_state_change_event
|
from homeassistant.helpers.event import async_track_state_change_event
|
||||||
|
|
||||||
@ -37,6 +37,7 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
entity_id = config.get(CONF_ENTITY_ID)
|
entity_id = config.get(CONF_ENTITY_ID)
|
||||||
zone_entity_id = config.get(CONF_ZONE)
|
zone_entity_id = config.get(CONF_ZONE)
|
||||||
event = config.get(CONF_EVENT)
|
event = config.get(CONF_EVENT)
|
||||||
|
job = HassJob(action)
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def zone_automation_listener(zone_event):
|
def zone_automation_listener(zone_event):
|
||||||
@ -65,8 +66,8 @@ async def async_attach_trigger(hass, config, action, automation_info):
|
|||||||
and not to_match
|
and not to_match
|
||||||
):
|
):
|
||||||
description = f"{entity} {_EVENT_DESCRIPTION[event]} {zone_state.attributes[ATTR_FRIENDLY_NAME]}"
|
description = f"{entity} {_EVENT_DESCRIPTION[event]} {zone_state.attributes[ATTR_FRIENDLY_NAME]}"
|
||||||
hass.async_run_job(
|
hass.async_run_hass_job(
|
||||||
action,
|
job,
|
||||||
{
|
{
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"platform": "zone",
|
"platform": "zone",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user