Add area support to group service schemas (#25410)

This commit is contained in:
Aaron Bach 2019-07-24 08:40:34 -06:00 committed by Andrew Sayre
parent 18ba2f986e
commit 00a5a5f3c0

View File

@ -16,6 +16,7 @@ from homeassistant.helpers.entity import Entity, async_generate_entity_id
from homeassistant.helpers.entity_component import EntityComponent
from homeassistant.helpers.event import async_track_state_change
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA
from homeassistant.util.async_ import run_coroutine_threadsafe
from .reproduce_state import async_reproduce_states # noqa
@ -45,8 +46,7 @@ SERVICE_REMOVE = 'remove'
CONTROL_TYPES = vol.In(['hidden', None])
SET_VISIBILITY_SERVICE_SCHEMA = vol.Schema({
vol.Optional(ATTR_ENTITY_ID): cv.comp_entity_ids,
SET_VISIBILITY_SERVICE_SCHEMA = ENTITY_SERVICE_SCHEMA.extend({
vol.Required(ATTR_VISIBLE): cv.boolean
})