From 80128c159a72c72984ca475af81659f28aeb4b4d Mon Sep 17 00:00:00 2001 From: Danny Tsang <567982+dannytsang@users.noreply.github.com> Date: Wed, 10 Jan 2024 13:08:33 +0000 Subject: [PATCH] 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 --------- Co-authored-by: Franck Nijhof --- source/_integrations/schedule.markdown | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/_integrations/schedule.markdown b/source/_integrations/schedule.markdown index 1ad04a09f4b..f6025ffeeb8 100644 --- a/source/_integrations/schedule.markdown +++ b/source/_integrations/schedule.markdown @@ -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`.