I have a ESP controller which control my sauna using climate with pid and ac dimmer for a smooth control.
For a safety reason I would like to add a power contactor to cut off the 230 Vac line.
The idea is to turn the contactor once the climate is in mode “HEAT” and turn off when the climate is “OFF”.
I can not figure out how to do so. I’m can imagine something with lambda, but can not figure out where to put it.
Would you have iny suggestions?
sensor: - platform: dallas name: "Sauna temperature" address: 0x1E00000001BF7128 id: sauna_temperature_sensor output: - platform: ac_dimmer id: dimmer1 max_power: 0.8 min_power: 0.2 gate_pin: GPIO32 zero_cross_pin: number: GPIO33 mode: input: true inverted: yes switch: - platform: gpio pin: GPIO21 id: Contactor name: "Contactor" climate: - platform: pid id: pid_climate name: "PID Sauna Controller" visual: min_temperature: 40 °C max_temperature: 90 °C temperature_step: 1 °C sensor: sauna_temperature_sensor default_target_temperature: 70°C heat_output: dimmer1 control_parameters: kp: 1.44 ki: 13.5 kd: 1.8