Is there a way to program the ESP’s in ESPHome to execute commands (read button presses to turn on/off lights) by itself, for when the (Lan or Wifi) connection to HA would be down or when HA has crashed ?
This would be cool to have it backed up like this, especially for the WAF (Wife Accentancy Factor) … not being 100% dependent on HA anymore for operating basic things (e.g. switch lights on/off).
pressing a button for switching on a light, but when HA doesn’t respond by turning on the light, ESP does it by itself …
yes, this is a way to have ESPHome ALWAYS control the light … which takes away all the advantages of using HA automations to control the lights (sometimes adding extra commands when pressing a light switch) …
so, isn’t there a way to insert something like “… but if HA doesn’t respond, do it yourself”
90% of my lights have esphome switches (as well as dimmers), and they continue working also when HA is offline.
And it doesn’t matter what triggered the light; HA will show the status accordingly…
can the ESP be programmed to do dimming as well ?
short push on/off (on to the last set dim value off to zero) ?
long push dim step 5% or 10% up/down ?
double push is on to 100%
really ?!
I had Zwave dimmers before and they worked like above … would be awesome to bring this back to my ESP dimmers as well …
you can do something like this just need to add more the timing:
- platform: gpio
name: "GA_Em_B_Szoba_Kapcsolo_5"
id: "GA_Em_B_Szoba_Kapcsolo_5"
pin:
number: GPIO32
inverted: true
mode:
input: true
pullup: true
filters:
- delayed_on: 30ms
- delayed_off: 30ms
on_multi_click:
- timing:
- ON for 40ms to 400ms
- OFF for 40ms to 300ms
- ON for 40ms to 400ms
- OFF for at least 330ms
then:
- text_sensor.template.publish:
id: GA_Em_B_Szoba_Kapcsolo_KEYS
state: !lambda 'return "double_5";'
- timing:
- ON for 40ms to 400ms
- OFF for 40ms to 300ms
- ON for 40ms to 400ms
- OFF for 40ms to 300ms
- ON for 40ms to 400ms
- OFF for at least 50ms
then:
- text_sensor.template.publish:
id: GA_Em_B_Szoba_Kapcsolo_KEYS
state: !lambda 'return "triple_5";'
you can check here:
i guess this is exaqcly what you want:
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at most 1s
- ON for at most 1s
- OFF for at least 0.2s
then:
- logger.log: "Double Clicked"
- timing:
- ON for 1s to 2s
- OFF for at least 0.5s
then:
- logger.log: "Single Long Clicked"
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- logger.log: "Single Short Clicked"