Added instructions to scheduled actions
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user