feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

Adding support for Home Assistant event entity

Open jkolo opened this issue 1 year ago • 4 comments

Describe the problem you have/What new integration you would like

The Event entity was introduced in Home Assistant 2023.8. ESPhome should introduce support for this type of entity

Please describe your use case for this integration and alternatives you've tried:

The doorbell is a good example. I am currently operating it as a binary_sensor with the PRESENCE class, and the event is dedicated to this type of device.

Additional context

Home Assistant documentation:

  • Integration: https://www.home-assistant.io/integrations/event/
  • Developer: https://developers.home-assistant.io/docs/core/entity/event/

jkolo avatar Oct 16 '23 10:10 jkolo

Thinking along with https://github.com/esphome/feature-requests/issues/2282, all components supporting interrupts, should support configuring event entities.

nagyrobi avatar Oct 16 '23 11:10 nagyrobi

Would be useful also to handle multiclicks event in general.

luca-iodice avatar Feb 01 '24 13:02 luca-iodice

No button events in ESP Home yet ? I would like to fire some events on a button press like e.g 'Single Click' 'Double Click' 'Long Click' This could become very handy since my entire house uses ESP Home to read all buttons for the lights. Currently I have some magic in a blueprint in order to determine the click type (single double, ....) of a binary sensor. But since this feels rather trickery, it would be well received to have these events implemented.

I got inspired by the shelly integration since smart switches with a push button as input, will use the event entity to report "single push", "double push", ...

Same goes for my Philips Hue remote.

Kind regards, Robbe

Robbe-B avatar Feb 27 '24 12:02 Robbe-B

For now the only known workaround to me is to use binary sensors. Obviously you create a lot of redundant yaml code and chattery in the event bus.

luca-iodice avatar Feb 27 '24 16:02 luca-iodice

Yup, I completely agree that is is needed. Currently the only events that are natively sent are "pressed" and "released" as state changes for each binary sensor (as far as I understand the problem)

It would be so useful to be able to neatly send "double_clicked" and others into HA's events-list without creating lots of other bloating binary sensors.

(A screenshot of the logbook mock how it should look like)

image

Globolo001 avatar Apr 09 '24 22:04 Globolo001

Can't believe this is actually happening => https://github.com/esphome/esphome/pull/6451 @nohat, thank you for all these efforts, I hope this can get merged soon.

Robbe-B avatar Apr 10 '24 06:04 Robbe-B