Remove device from device action schema (#26536)
This commit is contained in:
parent
b14b14c3c9
commit
02ded7a4a8
6 changed files with 29 additions and 30 deletions
|
@ -9,7 +9,12 @@ from typing import Optional, Sequence, Callable, Dict, List, Set, Tuple
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import HomeAssistant, Context, callback, CALLBACK_TYPE
|
||||
from homeassistant.const import CONF_CONDITION, CONF_DEVICE, CONF_DOMAIN, CONF_TIMEOUT
|
||||
from homeassistant.const import (
|
||||
CONF_CONDITION,
|
||||
CONF_DEVICE_ID,
|
||||
CONF_DOMAIN,
|
||||
CONF_TIMEOUT,
|
||||
)
|
||||
from homeassistant import exceptions
|
||||
from homeassistant.helpers import (
|
||||
service,
|
||||
|
@ -66,7 +71,7 @@ def _determine_action(action):
|
|||
if CONF_EVENT in action:
|
||||
return ACTION_FIRE_EVENT
|
||||
|
||||
if CONF_DEVICE in action:
|
||||
if CONF_DEVICE_ID in action:
|
||||
return ACTION_DEVICE_AUTOMATION
|
||||
|
||||
return ACTION_CALL_SERVICE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue