I’m using a bunch of z-wave power measurement sensors trying to get control of my power usage, I’ve managed to create a template sensors that shows the current usage of all sensors, another sensor that multiplies that value with the cost per watt to get the current cost per hour for my usage.
Now I would like to create a sensor that measures the power usage from the first each month up to the current date/time, then resets at the end of the month. Has anyone done this or know of a way to do this?
I’ll try to ilustrate it with a pic of my current config
The badges shows the current usage and cost/hour, and the total usage/cost since “start”, which in this case is when i first enabled the z-wave device in my z-wave network.
this is were i would like to measure it per month instead, to show the total power usage for 1st of april to today (18th).
I can’t tell you how to do this only using hass. I’ve achieved something similar to what you’re trying to do using emonCMS (http://emoncms.org) and also, independently, using influxDB/grafana. For the latter I haven’t actually checked whether it is counting correctly.
If you’re interested in setting up another piece of software I can share screenshots of my settings.
SELECT cumulative_sum(difference("value")) FROM "kWh" WHERE "entity_id" = 'energy_sensor' AND $timeFilter GROUP BY time($__interval) fill(null)
Add a panel for each device you are monitoring. By selecting the period you should be able to see the usage for the given period.
I noticed it starts showing up zeroes if I use periods longer than a week that do not see lots of usage - e.g. 4-5kWh. I’d appreciate if you give me some feedback as to how precise the measurement is actually.