Hello.
I have, maybe a stupid, idea.
Y have a sonoff with epshome that have a 1 relay. its simple.
This relay have a usb fan that send air to a router.
My idea is only power on the relay in “winter” when i have a helper in “winter mode”.
When the “winter mode” is on, the relay is off. and when the “winter mode” is off, the relay is on.
I can make this with a automation but i think its interesting in the on_bott of esphome because when i lost the power or other problem. the esphome allways will be boot in the corres relay status.
my problem? i dont know how to make this
this code is my logical, but the code im sure is wrong.
someone can help me?
thanks a lot!!!
on_boot:
priority: 600
then:
- platform: homeassistant
id: winter_mode
entity_id: input_boolean.modo_invierno_calefaccion
internal: true
- if:
condition:
winter_mode = off
then:
- switch.turn_on: relay
else:
- switch.turn_off: relay