Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measuring Events #179

Closed
3 tasks done
hco opened this issue Sep 5, 2024 · 1 comment
Closed
3 tasks done

Measuring Events #179

hco opened this issue Sep 5, 2024 · 1 comment

Comments

@hco
Copy link

hco commented Sep 5, 2024

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

I would like to count events. I have a button which only emits events, but would love to count them using measureit

Describe the solution you'd like

Maybe similar to how templates can be defined, we could define events that are being matched?

Describe alternatives you've considered

Right now I have a counter helper that I increment using an automation

Additional context

@danieldotnl
Copy link
Owner

I have thought about it before, but decided against implementing this, since events are an advanced concept in HA, not really meant for the end user. It is also tricky to filter out the right event, especially if it is depending on data in the event.

I recommend to create an automation that listens to the event and updates a counter. You can then have MeasureIt measure the counter updates per day/week/month/etc.
I use something like this myself:

alias: Flight counter
description: ""
mode: single
triggers:
  - event_type: flightradar24_entry
    trigger: event
conditions: []
actions:
  - metadata: {}
    data: {}
    target:
      entity_id: counter.flights_in_area
    action: counter.increment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants