From 32d5e68e2a91bea1adb00dfa0c5bc40a18b4b76e Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 31 Oct 2023 14:08:47 +0100 Subject: [PATCH] Added instructions to scheduled actions --- (EN)-Customization.md | 64 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/(EN)-Customization.md b/(EN)-Customization.md index 346f0d5..5948b84 100644 --- a/(EN)-Customization.md +++ b/(EN)-Customization.md @@ -367,3 +367,67 @@ script: call.perform(); } ``` + +  +### Scheduled actions +Although ESPHome doesn't have a Scheduler component, it is possible to use the timer to schedule actions and this is entirely managed in the device, so it will work even if Home Assistant and/or the Wi-Fi are unavailable. +Following some examples: +#### Scheduled relay +```yaml +# Scheduled relay +time: + - id: !extend time_provider + on_time: + - hours: 7 + minutes: 30 + seconds: 0 + then: + - switch.turn_on: relay_1 + - hours: 12 + minutes: 15 + seconds: 0 + then: + - switch.turn_off: relay_1 + - hours: 19 + minutes: 0 + seconds: 0 + then: + - switch.turn_on: relay_1 + - hours: 23 + minutes: 30 + seconds: 0 + then: + - switch.turn_off: relay_1 +``` +#### Scheduled climate +> This requires add-on climate to be installed +```yaml +# Scheduled climate +time: + - id: !extend time_provider + on_time: + - hours: 7 + minutes: 0 + seconds: 0 + then: + - climate.control: + id: thermostat_embedded + mode: auto + target_temperature: 22°C + - hours: 19 + minutes: 0 + seconds: 0 + then: + - climate.control: + id: thermostat_embedded + mode: auto + target_temperature: 20°C + - hours: 23 + minutes: 0 + seconds: 0 + then: + - climate.control: + id: thermostat_embedded + mode: auto + target_temperature: 18°C +``` \ No newline at end of file