02-01-2023, 06:34 PM
I can, but its over 1200 lines. It includes single click, multi click and long click for every input that can later be configured in home assistant.
For now i tried this:
This works with the normal inputs but not with A1 to A4
Since i do not want to damage the board, can you explain how to wire it to a button?
Do i have to use Analog Threshold Binary Sensor https://esphome.io/components/binary_sen...shold.html instead of a normal gpio platform?
Thank you
For now i tried this:
Code:
- platform: gpio
name: ""
id: "A1_input"
pin:
number: 36
mode: INPUT
#inverted: true
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- switch.toggle: e16s_output16
- logger.log: ${device_name} A1_input Single-Click
- text_sensor.template.publish:
id: A1_input_action
state: !lambda 'return "single";'
- timing:
- ON for at most 1s
- OFF for at most 0.3s
- ON for at most 1s
- OFF for at least 0.2s
then:
- logger.log: ${device_name} A1_input Double-Click
- text_sensor.template.publish:
id: A1_input_action
state: !lambda 'return "double";'
- timing:
- ON for 1s to 4s
- OFF for at least 0.2s
then:
- logger.log: ${device_name} A1_input Long-Click
- text_sensor.template.publish:
id: A1_input_action
state: !lambda 'return "long";'
This works with the normal inputs but not with A1 to A4
Since i do not want to damage the board, can you explain how to wire it to a button?
Do i have to use Analog Threshold Binary Sensor https://esphome.io/components/binary_sen...shold.html instead of a normal gpio platform?
Thank you