Edit esp-reterminal-e1001.yaml
This commit is contained in:
@@ -1082,7 +1082,7 @@ mqtt:
|
|||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# DEEP SLEEP:
|
# DEEP SLEEP:
|
||||||
# Five-minute timer wake plus either active-low white button through ESP32-S3 EXT1.
|
# Five-minute timer wake plus either active-low white button through ESP32-S3 EXT1.
|
||||||
# GPIO4 = right/appliances; GPIO5 = left/jobs.
|
# GPIO4 = right; GPIO5 = left.
|
||||||
# https://esphome.io/components/deep_sleep.html
|
# https://esphome.io/components/deep_sleep.html
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
deep_sleep:
|
deep_sleep:
|
||||||
@@ -1277,7 +1277,7 @@ light:
|
|||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# PHYSICAL BUTTONS:
|
# PHYSICAL BUTTONS:
|
||||||
# Buttons reset the post-interaction timeout. During deep sleep the white buttons are also
|
# Buttons reset the post-interaction timeout. During deep sleep the white buttons are also
|
||||||
# EXT1 wake sources; the wake-status mask selects the page before Home Assistant data loads.
|
# EXT1 wake sources. Both white buttons show and check the Jobs page.
|
||||||
# https://esphome.io/components/binary_sensor/gpio.html
|
# https://esphome.io/components/binary_sensor/gpio.html
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
@@ -1305,7 +1305,7 @@ binary_sensor:
|
|||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: button_right
|
id: button_right
|
||||||
name: "${friendly_name} Right Button - Appliances"
|
name: "${friendly_name} Right Button - Jobs"
|
||||||
pin:
|
pin:
|
||||||
number: GPIO4
|
number: GPIO4
|
||||||
allow_other_uses: true
|
allow_other_uses: true
|
||||||
@@ -1322,22 +1322,10 @@ binary_sensor:
|
|||||||
id(panel_awake_indicator) = true;
|
id(panel_awake_indicator) = true;
|
||||||
id(last_activity_ms) = millis();
|
id(last_activity_ms) = millis();
|
||||||
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
||||||
- if:
|
- display.page.show: page_jobs
|
||||||
condition:
|
- script.execute:
|
||||||
lambda: |-
|
id: refresh_display_if_changed
|
||||||
return id(current_page) != 1;
|
force: false
|
||||||
then:
|
|
||||||
- globals.set:
|
|
||||||
id: current_page
|
|
||||||
value: "1"
|
|
||||||
- display.page.show: page_appliances
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: true
|
|
||||||
else:
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: false
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
id: button_left
|
id: button_left
|
||||||
@@ -1358,26 +1346,14 @@ binary_sensor:
|
|||||||
id(panel_awake_indicator) = true;
|
id(panel_awake_indicator) = true;
|
||||||
id(last_activity_ms) = millis();
|
id(last_activity_ms) = millis();
|
||||||
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
||||||
- if:
|
- display.page.show: page_jobs
|
||||||
condition:
|
- script.execute:
|
||||||
lambda: |-
|
id: refresh_display_if_changed
|
||||||
return id(current_page) != 0;
|
force: false
|
||||||
then:
|
|
||||||
- globals.set:
|
|
||||||
id: current_page
|
|
||||||
value: "0"
|
|
||||||
- display.page.show: page_jobs
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: true
|
|
||||||
else:
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: false
|
|
||||||
|
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# HOME ASSISTANT CONTROLS:
|
# HOME ASSISTANT CONTROLS:
|
||||||
# Manual refresh and page-selection buttons
|
# Manual refresh and Jobs display button
|
||||||
# https://esphome.io/components/button/template.html
|
# https://esphome.io/components/button/template.html
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
button:
|
button:
|
||||||
@@ -1405,46 +1381,7 @@ button:
|
|||||||
id(panel_awake_indicator) = true;
|
id(panel_awake_indicator) = true;
|
||||||
id(last_activity_ms) = millis();
|
id(last_activity_ms) = millis();
|
||||||
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
||||||
- if:
|
- display.page.show: page_jobs
|
||||||
condition:
|
- script.execute:
|
||||||
lambda: |-
|
id: refresh_display_if_changed
|
||||||
return id(current_page) != 0;
|
force: false
|
||||||
then:
|
|
||||||
- globals.set:
|
|
||||||
id: current_page
|
|
||||||
value: "0"
|
|
||||||
- display.page.show: page_jobs
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: true
|
|
||||||
else:
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: false
|
|
||||||
|
|
||||||
- platform: template
|
|
||||||
id: show_appliances_page_button
|
|
||||||
name: "${friendly_name} Show Appliances Page"
|
|
||||||
icon: "mdi:washing-machine"
|
|
||||||
on_press:
|
|
||||||
then:
|
|
||||||
- lambda: |-
|
|
||||||
id(panel_awake_indicator) = true;
|
|
||||||
id(last_activity_ms) = millis();
|
|
||||||
id(awake_timeout_ms) = ${button_wake_awake_seconds} * 1000UL;
|
|
||||||
- if:
|
|
||||||
condition:
|
|
||||||
lambda: |-
|
|
||||||
return id(current_page) != 1;
|
|
||||||
then:
|
|
||||||
- globals.set:
|
|
||||||
id: current_page
|
|
||||||
value: "1"
|
|
||||||
- display.page.show: page_appliances
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: true
|
|
||||||
else:
|
|
||||||
- script.execute:
|
|
||||||
id: refresh_display_if_changed
|
|
||||||
force: false
|
|
||||||
|
|||||||
Reference in New Issue
Block a user