06-03-2023, 12:36 AM
just use AUTOMATION by different mode:
on_click (Optional, Automation): An automation to perform when the button is held down for a specified period of time. See on_click.
on_double_click (Optional, Automation): An automation to perform when the button is pressed twice for specified periods of time. See on_double_click.
on_multi_click (Optional, Automation): An automation to perform when the button is pressed in a specific sequence. See on_multi_click.
here have details: https://esphome.io/components/binary_sensor/index.html
on_click (Optional, Automation): An automation to perform when the button is held down for a specified period of time. See on_click.
on_double_click (Optional, Automation): An automation to perform when the button is pressed twice for specified periods of time. See on_double_click.
on_multi_click (Optional, Automation): An automation to perform when the button is pressed in a specific sequence. See on_multi_click.
here have details: https://esphome.io/components/binary_sensor/index.html