77 lines
2 KiB
YAML
77 lines
2 KiB
YAML
binary_sensor:
|
|
- platform: template
|
|
id: status_mirror_relay_fan
|
|
lambda: return id(relay_fan).state;
|
|
on_state:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_relay_fan_label
|
|
text:
|
|
format: "Fan: %s"
|
|
args: ['x ? "On" : "Off"']
|
|
- platform: template
|
|
id: status_mirror_relay_cool1
|
|
lambda: return id(relay_cool1).state;
|
|
on_state:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_relay_cool1_label
|
|
text:
|
|
format: "Cool Stage 1: %s"
|
|
args: ['x ? "On" : "Off"']
|
|
- platform: template
|
|
id: status_mirror_relay_cool2
|
|
lambda: return id(relay_cool2).state;
|
|
on_state:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_relay_cool2_label
|
|
text:
|
|
format: "Cool Stage 2: %s"
|
|
args: ['x ? "On" : "Off"']
|
|
- platform: template
|
|
id: status_mirror_relay_heat1
|
|
lambda: return id(relay_heat1).state;
|
|
on_state:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_relay_heat1_label
|
|
text:
|
|
format: "Heat Stage 1: %s"
|
|
args: ['x ? "On" : "Off"']
|
|
- platform: template
|
|
id: status_mirror_relay_heat2
|
|
lambda: return id(relay_heat2).state;
|
|
on_state:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_relay_heat2_label
|
|
text:
|
|
format: "Heat Stage 2: %s"
|
|
args: ['x ? "On" : "Off"']
|
|
|
|
sensor:
|
|
- platform: template
|
|
id: status_mirror_uptime
|
|
lambda: return id(uptime_sensor).state;
|
|
update_interval: 60s
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_uptime_label
|
|
text:
|
|
format: "Uptime: %.0f min"
|
|
args: ["x / 60.0f"]
|
|
|
|
text_sensor:
|
|
- platform: template
|
|
id: status_mirror_ip
|
|
lambda: return id(wifi_ip_text).state;
|
|
update_interval: 60s
|
|
on_value:
|
|
then:
|
|
- lvgl.label.update:
|
|
id: status_ip_label
|
|
text:
|
|
format: "IP: %s"
|
|
args: ["x.c_str()"]
|