Allow number & sensors references in numeric_state triggers/conditions (#18084)

This commit is contained in:
Franck Nijhof 2021-06-04 18:14:58 +02:00 committed by GitHub
parent 7e67df43c8
commit aa08471668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -182,17 +182,17 @@ Listing above and below together means the numeric_state has to be between the t
In the example above, the trigger would fire a single time if a numeric_state goes into the 17.1-24.9 range (from 17 and below or 25 and above). It will only fire again, once it has left the defined range and enters it again. In the example above, the trigger would fire a single time if a numeric_state goes into the 17.1-24.9 range (from 17 and below or 25 and above). It will only fire again, once it has left the defined range and enters it again.
</div> </div>
Number helpers (`input_number` entities) can be used in the `above` and `below` thresholds, making Number helpers (`input_number` entities), `number` and `sensor` entities that
the trigger more dynamic, like: contain a numeric value, an be used in the `above` and `below` thresholds,
making the trigger more dynamic, like:
```yaml ```yaml
automation: automation:
trigger: trigger:
- platform: numeric_state - platform: numeric_state
entity_id: sensor.temperature entity_id: sensor.outside_temperature
# input_number entity id can be specified for above and/or below thresholds # Other entity ids can be specified for above and/or below thresholds
above: input_number.temperature_threshold_high above: sensor.inside_temperature
below: input_number.temperature_threshold_low
``` ```
The `for:` can also be specified as `HH:MM:SS` like this: The `for:` can also be specified as `HH:MM:SS` like this:

View File

@ -154,7 +154,8 @@ condition:
below: 25 below: 25
``` ```
Number helpers (`input_number` entities) can be used in the `above` and `below` Number helpers (`input_number` entities), `number` and `sensor` entities that
contain a numeric value, can be used in the `above` and `below`
options to make the condition more dynamic. options to make the condition more dynamic.
```yaml ```yaml