1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Allow metadata in service call data (#66672)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
This commit is contained in:
Bram Kragten
2022-02-16 21:13:36 +01:00
committed by GitHub
parent 14e48bac3a
commit ef34f070ee
2 changed files with 8 additions and 0 deletions

View File

@@ -410,10 +410,16 @@ def test_service_schema():
"entity_id": "all",
"alias": "turn on kitchen lights",
},
{"service": "scene.turn_on", "metadata": {}},
)
for value in options:
cv.SERVICE_SCHEMA(value)
# Check metadata is removed from the validated output
assert cv.SERVICE_SCHEMA({"service": "scene.turn_on", "metadata": {}}) == {
"service": "scene.turn_on"
}
def test_entity_service_schema():
"""Test make_entity_service_schema validation."""