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

Allow number/sensor entities in numeric state conditions/triggers (#51439)

This commit is contained in:
Franck Nijhof
2021-06-04 18:14:48 +02:00
committed by GitHub
parent ede7932a57
commit 05241a7a68
3 changed files with 36 additions and 16 deletions

View File

@@ -926,7 +926,7 @@ SERVICE_SCHEMA = vol.All(
)
NUMERIC_STATE_THRESHOLD_SCHEMA = vol.Any(
vol.Coerce(float), vol.All(str, entity_domain("input_number"))
vol.Coerce(float), vol.All(str, entity_domain(["input_number", "number", "sensor"]))
)
CONDITION_BASE_SCHEMA = {vol.Optional(CONF_ALIAS): string}