Edit esp-gasheater.yaml

This commit is contained in:
ESPHome Device Builder
2026-06-12 17:37:07 +12:00
parent a839326029
commit 3423c18e8e
+16 -12
View File
@@ -432,27 +432,31 @@ binary_sensor:
if (!id(test_mode_enabled).state && id(mode_select).state == "AUTO") { if (!id(test_mode_enabled).state && id(mode_select).state == "AUTO") {
id(warmup_until_ms) = millis() + (${warmup_seconds} * 1000UL); id(warmup_until_ms) = millis() + (${warmup_seconds} * 1000UL);
} }
- choose: # ESPHome does not support Home Assistant's `choose:` action here,
# so this is written as nested if/else logic.
- if:
condition:
# OFF mode watches for local physical heater starts. # OFF mode watches for local physical heater starts.
# If someone presses the real heater ON button, the LEDs come on, this # If someone presses the real heater ON button, the LEDs come on, this
# powered_state turns ON, and ESPHome changes to AUTO and takes over. # powered_state turns ON, and ESPHome changes to AUTO and takes over.
- conditions: lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "OFF" && !id(self_power_on);'
- lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "OFF" && !id(self_power_on);' then:
sequence:
- script.execute: local_on_takeover - script.execute: local_on_takeover
else:
- if:
condition:
# In AUTO/MANUAL, if the controller intended the heater OFF but LEDs say ON, # In AUTO/MANUAL, if the controller intended the heater OFF but LEDs say ON,
# force the heater OFF. OFF is excluded because OFF performs local-start takeover. # force the heater OFF. OFF is excluded because OFF performs local-start takeover.
- conditions: lambda: 'return !id(test_mode_enabled).state && id(mode_select).state != "BYPASS (Remote Only)" && id(mode_select).state != "OFF" && !id(power_intended_on) && !id(self_power_on);'
- lambda: 'return !id(test_mode_enabled).state && id(mode_select).state != "BYPASS (Remote Only)" && id(mode_select).state != "OFF" && !id(power_intended_on) && !id(self_power_on);' then:
sequence:
- script.execute: enforce_heater_off - script.execute: enforce_heater_off
else:
- if:
condition:
# If the heater turns on externally while AUTO already intended it ON, # If the heater turns on externally while AUTO already intended it ON,
# re-baseline after warmup and continue normal automatic control. # re-baseline after warmup and continue normal automatic control.
- conditions: lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "AUTO" && id(power_intended_on) && !id(self_power_on);'
- lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "AUTO" && id(power_intended_on) && !id(self_power_on);' then:
sequence:
- lambda: |- - lambda: |-
id(ramp_until_ms) = millis() + (${fast_ramp_seconds} * 1000UL); id(ramp_until_ms) = millis() + (${fast_ramp_seconds} * 1000UL);
- delay: ${warmup_seconds}s - delay: ${warmup_seconds}s