mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add area support to remote service schemas (#25437)
* Add area support to remote service schemas * Base
This commit is contained in:
parent
5e2dfb14fb
commit
e4b4551b35
@ -10,11 +10,10 @@ from homeassistant.helpers.entity_component import EntityComponent
|
||||
from homeassistant.helpers.entity import ToggleEntity
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.const import (
|
||||
STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE,
|
||||
ATTR_ENTITY_ID)
|
||||
STATE_ON, SERVICE_TURN_ON, SERVICE_TURN_OFF, SERVICE_TOGGLE)
|
||||
from homeassistant.components import group
|
||||
from homeassistant.helpers.config_validation import ( # noqa
|
||||
PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE)
|
||||
ENTITY_SERVICE_SCHEMA, PLATFORM_SCHEMA, PLATFORM_SCHEMA_BASE)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -47,9 +46,9 @@ DEFAULT_HOLD_SECS = 0
|
||||
|
||||
SUPPORT_LEARN_COMMAND = 1
|
||||
|
||||
REMOTE_SERVICE_SCHEMA = vol.Schema({
|
||||
vol.Optional(ATTR_ENTITY_ID): cv.comp_entity_ids,
|
||||
})
|
||||
# Keep this in place so that platforms don't have to directly know about
|
||||
# ENTITY_SERVICE_SCHEMA:
|
||||
REMOTE_SERVICE_SCHEMA = ENTITY_SERVICE_SCHEMA
|
||||
|
||||
REMOTE_SERVICE_ACTIVITY_SCHEMA = REMOTE_SERVICE_SCHEMA.extend({
|
||||
vol.Optional(ATTR_ACTIVITY): cv.string
|
||||
|
Loading…
x
Reference in New Issue
Block a user