Utility Meter Helper -- Change Units?

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.

MeasureIt: Measure all you need based on time and templates! - Share your Projects! / Custom Integrations - Home Assistant Community (home-assistant.io)

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.

@josephny did you try it with the latest MeasureIt release?

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 :slight_smile: )