Giter Site home page Giter Site logo

Comments (10)

bigramonk avatar bigramonk commented on June 3, 2024 3

Agree, more examples would be nice.
I could not figure out a way to count the number of times my wine cellar door was opened in a day/week/month.

from ha-measureit.

danieldotnl avatar danieldotnl commented on June 3, 2024 2

For counting the planes during the night, I also created an automation that listens to the flightradar24_entry event and then updates a counter. Then MeasureIt uses that counter as a source sensor from 22:00-07:00h.

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

flightrader_measureit1
flightrader_measureit2
flightrader_measureit3

It would be very nice if MeasureIt can count events directly. I will add that to my roadmap!
@bigramonk that would solve your case as well, as opening the cellar door will trigger an event in home assistant.

from ha-measureit.

Tobias-N7 avatar Tobias-N7 commented on June 3, 2024 1

The concept of MeasureIt is great, but more examples would be really helpful.

I'm trying to get time stats with full/empty home battery, but can't get it to work.

Condition template:

{states('sensor.scb_battery_soc') | float > 95}
{states('sensor.scb_battery_soc') | float < 10}

Edit:
Works now! Double brackets are mandatory. Didn't knew that.

{{states('sensor.scb_battery_soc') | float > 95}}
{{states('sensor.scb_battery_soc') | float < 10}}

from ha-measureit.

danieldotnl avatar danieldotnl commented on June 3, 2024 1

Now available in v0.5.4! Let me know your experiences!

from ha-measureit.

timbrd avatar timbrd commented on June 3, 2024

Same here. I haven't been able to count planes using flightradar integration. Examples how to use measureit would be great.

from ha-measureit.

bigramonk avatar bigramonk commented on June 3, 2024

@bigramonk that would solve your case as well, as opening the cellar door will trigger an event in home assistant.

I already have an automation triggered by the opening of my cellar which sends me a picture by Telegram. I'll add the counter, that should do the trick.
Thanks!

from ha-measureit.

danieldotnl avatar danieldotnl commented on June 3, 2024

That is indeed the most straightforward solution. The strength of MeasureIt would be if you want to count specifically how many times the cellar opens when you are not home, or when it's >30 degrees, etc.

from ha-measureit.

AnthonyBe avatar AnthonyBe commented on June 3, 2024

It would be very nice if MeasureIt can count events directly. I will add that to my roadmap!

From my initial reading of description, I (and clearly others) thought that was what the integration actually did!
I really look forward to this capability being built-in to the integration!

from ha-measureit.

AnthonyBe avatar AnthonyBe commented on June 3, 2024

Now available in v0.5.4! Let me know your experiences!

Brilliant! It would be great if you could provide new step by step instructions for the example counting planes with Flight radar based on the new version of MeasureIt!

from ha-measureit.

danieldotnl avatar danieldotnl commented on June 3, 2024

To be honest, I don't think this changes something to the approach I wrote down above.
I decided against listening to events in MeasureIt since it's quite an advanced concept which most users are not familiair with. Instead I implemented a counter that counts every time a condition becomes True.
You could use this and count each time 'sensor.flightradar24_entered_area' > 0, but then you'll miss out when 2 or more planes are entering.

from ha-measureit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.