Add example automation using the schedule helper (#30668)

* Added example automation using the schedule helper.

* Correct example title.

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Danny Tsang 2024-01-10 13:08:33 +00:00 committed by GitHub
parent 262cf36b2c
commit 80128c159a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,23 @@ automations and templates.
| Attribute | Description |
| ----- | ----- |
| `next_event` | A datetime object containing the next time the schedule is going to change state. |
### Automation example
A schedule creates an on/off (binary) sensor within the times set. Using the thermostat schedule example above, you can turn on your thermostat:
```yaml
trigger:
- platform: state
entity_id:
- binary_sensor.thermostat_schedule
to: "on"
action:
- service: climate.turn_on
target:
entity_id: climate.thermostat
```
### Services
Available service: `schedule.reload`.