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

Add a Service: Increment Counter #125

Open
3 tasks done
nicknol opened this issue Apr 20, 2024 · 2 comments
Open
3 tasks done

Add a Service: Increment Counter #125

nicknol opened this issue Apr 20, 2024 · 2 comments

Comments

@nicknol
Copy link

nicknol commented Apr 20, 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.

no problem - just a new feature

Describe the solution you'd like

A service that would increase a MeasureIt counter

Describe alternatives you've considered

At the moment a counter is increased when a status change happens. Which works!!

But in some cases I only have an automation that detects something countable, e.g. the power consumption of my coffee machine drops below a specified value, and that means one more cup of coffee has been brewed.
Currently, the automation turns an input_boolean to on, waits for 5 seconds, and turns it off again. and MeasureIt counts the status change.

Additional context

And it's not only my coffee machine ;) I use a similar approach for my dish washer, my dryer, ...

@nicknol nicknol changed the title Add a Service for Increment Counter Add a Service: Increment Counter Apr 20, 2024
@danieldotnl
Copy link
Owner

Not saying this is not a good idea, but can't you do something like this in MeasureIt, instead of having an automation and input_boolean in between?

{{ states('sensor.my_coffee_machine_power') | float < 10 and now() - states.sensor.my_coffee_machine_power.last_changed > timedelta(seconds=5) }}

@nicknol
Copy link
Author

nicknol commented Apr 23, 2024

thanks a lot for your suggestion.
but, well, it's not that easy.
the power consumption for brewing a coffee, just rinsing, or doing maintenance would trigger the mentioned template and count coffees not being brewed. Not do speak about the power consumption profiles of a dish washer, a dryer or a washing machine.

=>There are blueprints around for the detection of appliances being running or having finished.

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