mirror of
https://github.com/esphome/esphome.git
synced 2024-11-16 03:58:09 +01:00
35 lines
831 B
YAML
35 lines
831 B
YAML
switch:
|
|
- platform: template
|
|
id: template_switch1
|
|
optimistic: true
|
|
- platform: template
|
|
id: template_switch2
|
|
optimistic: true
|
|
|
|
sensor:
|
|
- platform: template
|
|
id: template_sensor1
|
|
lambda: |-
|
|
if (millis() > 10000) {
|
|
return 42.0;
|
|
} else {
|
|
return 0.0;
|
|
}
|
|
update_interval: 60s
|
|
|
|
climate:
|
|
- platform: bang_bang
|
|
name: Bang Bang Climate
|
|
sensor: template_sensor1
|
|
humidity_sensor: template_sensor1
|
|
default_target_temperature_low: 18°C
|
|
default_target_temperature_high: 24°C
|
|
idle_action:
|
|
- switch.turn_on: template_switch1
|
|
cool_action:
|
|
- switch.turn_on: template_switch2
|
|
heat_action:
|
|
- switch.turn_on: template_switch1
|
|
away_config:
|
|
default_target_temperature_low: 16°C
|
|
default_target_temperature_high: 20°C
|