pauln / esphome-linp-doorbell-g03

ESPHome custom component for linp-doorbell-g03
MIT License
44 stars 8 forks source link

where are all button sensors on external_components branch? #31

Closed vecjh closed 1 year ago

vecjh commented 1 year ago

Hi, I can no longer compile this on the main branch. But it went OK with external_components branch. However, it doesn't have button sensors? How can they be added back? I miss them as I rely on them for HA automations.

pauln commented 1 year ago

The external_components branch doesn't have the button sensors, instead focusing on events. You should be able to change the trigger in your HA automations to be an Event trigger, using esphome.linp_doorbell_button_pressed as the event name, and set the event data to button: "1" (replacing 1 with the appropriate button number); if you have more than one of these doorbell units, you can also add device: "your_device_name" to listen to button presses from a specific unit. You can use the Events tab on the Developer Tools page in HA to listen for these events in order to check which button number and device name to use.

vecjh commented 1 year ago

@pauln thanks a lot for prompt help! Much appreciated. That worked indeed. I was about to find it myself through digging the code. But was unsure of the HA's naming convention of events. Documentation is poor on 3rd party event naming. So I'm closing the issue.