From e4b4551b350a74b7b5a4dafd2f148a6387c14c01 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Tue, 23 Jul 2019 17:05:55 -0600 Subject: [PATCH] Add area support to remote service schemas (#25437) * Add area support to remote service schemas * Base --- homeassistant/components/remote/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/remote/__init__.py b/homeassistant/components/remote/__init__.py index 568ea8ece32..762c972dd6b 100644 --- a/homeassistant/components/remote/__init__.py +++ b/homeassistant/components/remote/__init__.py @@ -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