eventsensor icon indicating copy to clipboard operation
eventsensor copied to clipboard

Time fired in state?

Open hvorragend opened this issue 3 years ago • 2 comments

I am trying to create event sensors for homematic.keypress events.

My problem is that I alway have PRESS_SHORT in my state. So that I cannot see if this entity has changed (the value). I just the the last change time. It does't make sense inside a logbook card. 😄

Is it possible store the event time in this new entity? I'be tried the following without success:

- platform: eventsensor
  name: Doorbell
  unique_id: eventsensor_doorbell
  event: homematic.keypress
  # state: param
  state: time_fired
  event_data:
    name: Doorbell
    param: PRESS_SHORT
    channel: 1

Or is it possible to clear the state content similar as "off_delay: 1" (see binary_sensor)?

hvorragend avatar Jul 11 '21 20:07 hvorragend

I've done this that way: https://www.home-assistant.io/integrations/template/#turning-an-event-into-a-binary-sensor

hvorragend avatar Oct 20 '21 18:10 hvorragend

but how? see: https://community.home-assistant.io/t/trigger-template-based-on-hue-switches-need-event-time-fired/364084

need the time_fired to be part of the trigger, and dont know how to do that....

Mariusthvdb avatar Dec 06 '21 22:12 Mariusthvdb