Do not select all entities when omitting entity ID in service call (#29178)

* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-12-02 16:23:12 -08:00
1 parent 9587afc5ce
commit 02d9ed5e36
47 files changed
+538 -626

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ from homeassistant.loader import bind_hass
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers.entity_component import EntityComponent
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.config_validation import ENTITY_SERVICE_SCHEMA
from homeassistant.helpers.config_validation import make_entity_service_schema
from homeassistant.helpers.service import async_set_service_schema
from homeassistant.helpers.script import Script
@@ -60,7 +60,7 @@ CONFIG_SCHEMA = vol.Schema(
)
SCRIPT_SERVICE_SCHEMA = vol.Schema(dict)
SCRIPT_TURN_ONOFF_SCHEMA = ENTITY_SERVICE_SCHEMA.extend(
SCRIPT_TURN_ONOFF_SCHEMA = make_entity_service_schema(
{vol.Optional(ATTR_VARIABLES): dict}
)
RELOAD_SERVICE_SCHEMA = vol.Schema({})