mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 16:56:50 +00:00
Add referencing sensor entities for before/after in time conditions (#18115)
This commit is contained in:
parent
6a81548dc6
commit
c1f6e7ef5f
@ -474,15 +474,29 @@ A better weekday condition could be by using the [Workday Binary Sensor](/integr
|
||||
|
||||
</div>
|
||||
|
||||
For the `after` and `before` options a time helper (`input_datetime` entity) can be used instead.
|
||||
For the `after` and `before` options a time helper (`input_datetime` entity)
|
||||
or another `sensor` entity containing a timestamp with the "timestamp" device
|
||||
class, can be used instead.
|
||||
|
||||
```yaml
|
||||
condition:
|
||||
condition: time
|
||||
after: input_datetime.house_silent_hours_start
|
||||
before: input_datetime.house_silent_hours_end
|
||||
- alias: "Example referencing a time helper"
|
||||
condition: time
|
||||
after: input_datetime.house_silent_hours_start
|
||||
before: input_datetime.house_silent_hours_end
|
||||
|
||||
- alias: "Example referencing another sensor"
|
||||
after: sensor.groceries_delivery_time
|
||||
```
|
||||
|
||||
<div class='note warning'>
|
||||
|
||||
Please note that the time condition only takes the time into account. If
|
||||
an referenced sensor or helper entity contains a timestamp with a date, the
|
||||
date part is fully ignored.
|
||||
|
||||
</div>
|
||||
|
||||
## Zone condition
|
||||
|
||||
Zone conditions test if an entity is in a certain zone. For zone automation to work, you need to have set up a device tracker platform that supports reporting GPS coordinates.
|
||||
|
Loading…
x
Reference in New Issue
Block a user