mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Merge branch 'current' into rc
This commit is contained in:
commit
9e0bff4301
@ -40,16 +40,6 @@ $primary-color: #049cdb;
|
||||
}
|
||||
}
|
||||
}
|
||||
.feedback {
|
||||
h4 {
|
||||
margin: 0 0 8px !important;
|
||||
|
||||
a {
|
||||
text-decoration: none !important;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.integration-alert {
|
||||
margin: -1em 0;
|
||||
@ -132,6 +122,24 @@ $primary-color: #049cdb;
|
||||
}
|
||||
}
|
||||
|
||||
.feedback {
|
||||
box-shadow: none;
|
||||
border: 1px solid rgba(0, 0, 0, .12);
|
||||
border-radius: 4px;
|
||||
h4 {
|
||||
margin: 0 0 8px !important;
|
||||
|
||||
a {
|
||||
text-decoration: none !important;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.links a {
|
||||
font-weight: 400;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.frontpage {
|
||||
.material-card {
|
||||
margin-bottom: 24px;
|
||||
|
@ -173,7 +173,7 @@ automation:
|
||||
|
||||
## Numeric state trigger
|
||||
|
||||
Fires when the numeric value of an entity's state (or attribute's value if using the `attribute` property) **crosses** (and only when crossing) a given threshold. On state change of a specified entity, attempts to parse the state as a number and fires if the value is changing from above to below or from below to above the given threshold.
|
||||
Fires when the numeric value of an entity's state (or attribute's value if using the `attribute` property, or the calculated value if using the `value_template` property) **crosses** (and only when crossing) a given threshold. On state change of a specified entity, attempts to parse the state as a number and fires if the value is changing from above to below or from below to above the given threshold.
|
||||
|
||||
{% raw %}
|
||||
|
||||
@ -182,13 +182,13 @@ automation:
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.temperature
|
||||
# Optional
|
||||
value_template: "{{ state.attributes.battery }}"
|
||||
# If given, will trigger when the value of the given attribute for the given entity changes..
|
||||
attribute: attribute_name
|
||||
# ..or alternatively, will trigger when the value given by this evaluated template changes.
|
||||
value_template: "{{ state.attributes.value - 5 }}"
|
||||
# At least one of the following required
|
||||
above: 17
|
||||
below: 25
|
||||
# If given, will trigger when the value of the given attribute for the given entity changes
|
||||
attribute: attribute_name
|
||||
# If given, will trigger when the condition has been true for X time; you can also use days and milliseconds.
|
||||
for:
|
||||
hours: 1
|
||||
@ -198,6 +198,36 @@ automation:
|
||||
|
||||
{% endraw %}
|
||||
|
||||
When the `attribute` option is specified the trigger is compared to the given `attribute` instead of the state of the entity.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: climate.kitchen
|
||||
attribute: current_temperature
|
||||
above: 23
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
More dynamic and complex calculations can be done with `value_template`.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
automation:
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: climate.kitchen
|
||||
value_template: "{{ state.attributes.current_temperature - state.attributes.temperature_set_point }}"
|
||||
above: 3
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
<div class='note'>
|
||||
Listing above and below together means the numeric_state has to be between the two values.
|
||||
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.
|
||||
@ -225,8 +255,6 @@ automation:
|
||||
trigger:
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.temperature
|
||||
# Optional
|
||||
value_template: "{{ state.attributes.battery }}"
|
||||
# At least one of the following required
|
||||
above: 17
|
||||
below: 25
|
||||
|
Loading…
x
Reference in New Issue
Block a user