I have a Utility Meter Help to keep track of daily totals, but the total are in seconds.
Is there a way, without creating another sensor, to perform the math to convert seconds to hours within the utility meter help function?
I have a Utility Meter Help to keep track of daily totals, but the total are in seconds.
Is there a way, without creating another sensor, to perform the math to convert seconds to hours within the utility meter help function?
Sure, change your source sensors to be in hours.
As we said in the 80’s:
OMG!
Duh!
That’s why you get the big bucks!
I actually decided to turn on my brain thanks to you, went back to the docs for the MeasureIT integration (looking to populate the “value template” with the correct expression to convert), and sure enough there is a “units” field that can be populated with s, h, min, or d.
Thank you (again, and again)!
I spoke too soon.
Even though the entity in the integration is created and instructed to use h as its units, it is counting seconds.
How is that different from the History Stats integration?
Did you create the Utility meters from the UI or by using YAML?
MeasureIt has overlap with both the utility_meter
and history_stats
. The strongest differentiator is the conditional measuring logic.
For example: “Measure the gas consumption when the shower is on.” That’s pretty complicated with the utility_meter
. Or “measure solar panel production between 9-12”.
Same for measuring time (like history_stats
): “Measure how long the TV is on when the parents are not at home.”
It also has a counter: “Measure how many cats are detected by frigate during the night when the gate is not closed.”
Besides that it’s much easier to set up with a convenient config flow (but being the author, I’m biased of course )
I created the Measure It Utility Meter via the UI. Initially in “s” and changed to “h”. What is interesting, is that Statistics Graph do the visualization correct, that means changing from seconds to hours, the axis and values are correctly managed. Somehow, with Mini Graph Card, indeed the “s” and “h” labels are exchanged, but you still see “s” values Any idea how Mini Graph Card can manage Measure It?