Howdy! I made an esp for an electrical energy generator (ATS) in esphome. I don’t have internet where it is installed. The idea is to start the engine when it feels that there is no voltage on the mains, then connect the load after a minute. If the voltage comes, it remains on the generator for one minute, then it switches to the mains, the generator remains on for another 5 minutes to cool down. I have a problem if the voltage comes on the network and it goes away, in these 5 minutes, that is, it feels that voltage has come and the generator still stops after 5 minutes, without there being voltage on the network.
This is how the configuration looks like:
binary_sensor:
- platform: gpio
pin:
number: GPIO5
inverted: true
name: “Sensor Retea”
id: sensor_retea
on_press:
then:
- delay: 60s
- switch.turn_on: switch_retea
- delay: 300s
- switch.turn_off: switch_start_stop_generator
- delay: 60s
- switch.turn_off: switch_generator
on_release:
then:
- switch.turn_on: switch_start_stop_generator
- delay: 60s
- switch.turn_off: switch_retea
- delay: 60s
- switch.turn_on: switch_generator
switch: - platform: gpio
pin: GPIO14
name: “Switch Retea”
id: switch_retea
inverted: true
interlock: switch_generator - platform: gpio
pin: GPIO4
name: “Switch Generator”
id: switch_generator
inverted: true
interlock: switch_retea - platform: gpio
pin: GPIO16
name: “Switch Start/Stop Generator”
id: switch_start_stop_generator
inverted: true
Can you help me with other config, or any idea?
Thanks!