#Logbook events as timestamps

4 messages · Page 1 of 1 (latest)

twin raft
#

What's the most straightforward way to record logbook events (for example button presses) as entity states? Do I have to set up an automation and a date/time sensor entity for every single device I want to track?

Some background: I have a couple of Zigbee buttons, and want to record (long term) when they are pressed.
The main logbook contains these events but doesn't have a device filter so it's useless. The logbook on the device page only shows events from the past 24 hours.
I have influxdb and ltss integrations but those only track state changes, hence my approach of trying to convert those events to states. But doing it individually can be tedious. Wondering if there's a beter way.

west owl
#

I think a trigger template sensor is probably the way to go if you're wanting to track event times

twin raft
#

you mean something like this?

template:
  - trigger:
    - device_id: xyz
      domain: zha
      platform: device
      type: remote_button_short_press
      subtype: button
    sensor:
      - name: My Button Pressed
        unique_id: my_button_pressed
        state: '{{ now() }}'
west owl