Edit esp-gasheater.yaml
This commit is contained in:
+31
-27
@@ -432,33 +432,37 @@ 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,
|
||||||
# OFF mode watches for local physical heater starts.
|
# so this is written as nested if/else logic.
|
||||||
# If someone presses the real heater ON button, the LEDs come on, this
|
- if:
|
||||||
# powered_state turns ON, and ESPHome changes to AUTO and takes over.
|
condition:
|
||||||
- conditions:
|
# OFF mode watches for local physical heater starts.
|
||||||
- lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "OFF" && !id(self_power_on);'
|
# If someone presses the real heater ON button, the LEDs come on, this
|
||||||
sequence:
|
# powered_state turns ON, and ESPHome changes to AUTO and takes over.
|
||||||
- script.execute: local_on_takeover
|
lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "OFF" && !id(self_power_on);'
|
||||||
|
then:
|
||||||
# In AUTO/MANUAL, if the controller intended the heater OFF but LEDs say ON,
|
- script.execute: local_on_takeover
|
||||||
# force the heater OFF. OFF is excluded because OFF performs local-start takeover.
|
else:
|
||||||
- conditions:
|
- if:
|
||||||
- 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);'
|
condition:
|
||||||
sequence:
|
# In AUTO/MANUAL, if the controller intended the heater OFF but LEDs say ON,
|
||||||
- script.execute: enforce_heater_off
|
# force the heater OFF. OFF is excluded because OFF performs local-start takeover.
|
||||||
|
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);'
|
||||||
# If the heater turns on externally while AUTO already intended it ON,
|
then:
|
||||||
# re-baseline after warmup and continue normal automatic control.
|
- script.execute: enforce_heater_off
|
||||||
- conditions:
|
else:
|
||||||
- lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "AUTO" && id(power_intended_on) && !id(self_power_on);'
|
- if:
|
||||||
sequence:
|
condition:
|
||||||
- lambda: |-
|
# If the heater turns on externally while AUTO already intended it ON,
|
||||||
id(ramp_until_ms) = millis() + (${fast_ramp_seconds} * 1000UL);
|
# re-baseline after warmup and continue normal automatic control.
|
||||||
- delay: ${warmup_seconds}s
|
lambda: 'return !id(test_mode_enabled).state && id(mode_select).state == "AUTO" && id(power_intended_on) && !id(self_power_on);'
|
||||||
- script.execute: calibrate_to_min
|
then:
|
||||||
- script.execute: auto_control_tick
|
- lambda: |-
|
||||||
- script.execute: adjust_to_desired
|
id(ramp_until_ms) = millis() + (${fast_ramp_seconds} * 1000UL);
|
||||||
|
- delay: ${warmup_seconds}s
|
||||||
|
- script.execute: calibrate_to_min
|
||||||
|
- script.execute: auto_control_tick
|
||||||
|
- script.execute: adjust_to_desired
|
||||||
|
|
||||||
on_release:
|
on_release:
|
||||||
- lambda: |-
|
- lambda: |-
|
||||||
|
|||||||
Reference in New Issue
Block a user