to omit debouncing.
If I touch the switch it sometime switch on and off again rapidly.
How to do that It will change the state once - from off to on or vice versa - and “sleep” one second before reading next state?
By using the config I pointed you to.
Well 2 of them mention they are useful for debouncing push buttons and 1 useful for debouncing binary switches, so have a play with those.
Or perhaps even read the docs for the component you are using GPIO Binary Sensor — ESPHome
thank you - I will try both
i changed code to this:
binary_sensor:
- platform: gpio
pin:
number: GPIO4
inverted: True
name: "przycisk oswietlenie test"
on_press:
- switch.toggle: przekaznik_oswietlenie_test
and I don’t need to use any filters anymore
now switch works as expected
thank you very much for your support
1 Like