From ee7ec5f234005828d272a5d5434515a3e02f1573 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Tue, 23 Jul 2019 13:38:08 -0600 Subject: [PATCH] Add area support to scene service schemas (#25438) --- homeassistant/components/scene/__init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/scene/__init__.py b/homeassistant/components/scene/__init__.py index f15e3ec61f0..72040f05489 100644 --- a/homeassistant/components/scene/__init__.py +++ b/homeassistant/components/scene/__init__.py @@ -5,8 +5,8 @@ import logging import voluptuous as vol -from homeassistant.const import ATTR_ENTITY_ID, CONF_PLATFORM, SERVICE_TURN_ON -import homeassistant.helpers.config_validation as cv +from homeassistant.const import CONF_PLATFORM, SERVICE_TURN_ON +from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.state import HASS_DOMAIN @@ -52,10 +52,6 @@ PLATFORM_SCHEMA = vol.Schema( _platform_validator ), extra=vol.ALLOW_EXTRA) -SCENE_SERVICE_SCHEMA = vol.Schema({ - vol.Required(ATTR_ENTITY_ID): cv.entity_ids, -}) - async def async_setup(hass, config): """Set up the scenes.""" @@ -74,7 +70,7 @@ async def async_setup(hass, config): hass.services.async_register( DOMAIN, SERVICE_TURN_ON, async_handle_scene_service, - schema=SCENE_SERVICE_SCHEMA) + schema=ENTITY_SERVICE_SCHEMA) return True