Tracking kWh only during work days and hours

Hi all, pretty new to Home Assistant but really enjoying it to far.
I work from home and my employer pays for my PC and electric heater power in my office.
I previously used a crappy old school little meter which worked okish, but I’d like to smarten things up.
My PC and all monitors, and the heater, is plugged into a multibox which then goes to the TP-Link HS110 which has energy monitoring built in. So just one sensor to monitor.

What makes it more complicated is that I would like to only monitor the usage between 8.30am - 5pm, Monday to Friday. It’s my personal computer that I use for work. I use it a lot outside of working hours (as well as the heater) and also game on it, so I don’t want to charge my employer for that.

I have already got the TP-Link HS110 sensor integrated with Home Assistant, and I can pull out the daily kWh, total kWh, voltage, current and current power draw in watts.

I’m thinking I need to be monitoring the current watt draw between work hours and convert that to kWh.
I charge my employer at the end of every month, so I’ll need to be logging the daily usage I think.

As a bonus it would be great to be able to convert that kWh by approx 0.20 (cents) to get the total cost for the month, but I can do that myself if I have to, no big deal.

Any help would be appreciated.
Thanks

Have a look at the Utility Meter integration.

I already have the utility meter set up to measure it over 24 hours and one month, but I need only specific times measured during each day, not the whole day, and nothing for sat/sunday

Well I’m wondering if you could create automations to select a tariff for your work hours which has a value (0.2 cents), then a zero value for non-work hours. That way there is nothing added during the non-work hours.

1 Like

I’ve was able to use Node Red earlier to create an entity which only sends data during work hours. Prob not as clean as other solutions but seems to work fine.
I then need to convert that to kWh.
What I don’t know how to do is average out the kWh over the month, but not include the zero watts outside of working hours. I can’t just average out the whole day, I need to only average the hours during work time, then combine them all together for a figure at the end of each month.

Bumping if anybody has other ideas to monitor energy usage per month, but only for specific hours and days. Ideally also need to be able to view last months usage too.

Did you try the tariff idea?

I would just dump to sampled readings to CSV and do the calcs in Excel / Google Sheets.