Sensor for Electricity costs

Hello

Is there a simple template sensor that can convert wattage from a plug into cold hard cash? i.e. if I put the unit of electricity into it and it uses the wattage, it can give me a daily cost of this device please?

Does that make sense? Trying to separate a few electrical and see the actual cost of running them.

Cheers
Mark

You’ll want to look into the utility meters integration, once you have a kWh you can use that to multiply your electrical power cost from your power company to give you your cost.

ahh thanks for this… I presume I use sensor.home_assistant_energy_today?

 sensor.home_assistant_energy_today	0.033	unit_of_measurement: kWh
friendly_name: Home Assistant Energy Today
 sensor.home_assistant_energy_total	0.049	unit_of_measurement: kWh
friendly_name: Home Assistant Energy Total
 sensor.home_assistant_energy_yesterday	0.015	unit_of_measurement: kWh
friendly_name: Home Assistant Energy Yesterday
 sensor.home_assistant_power	10	unit_of_measurement: W
friendly_name: Home Assistant Power
 sensor.home_assistant_power_factor	0.49	friendly_name: Home Assistant Power Factor
 sensor.home_assistant_voltage	247	unit_of_measurement: V
friendly_name: Home Assistant Voltage

Based on what you posted, sensor.home_assistant_power but your device seems to already give you a kWh measurement which is what you multiply against your power per kWh from your power company.
You’ll need a template sensor with something like this (this will not be exact):

template_value: {{ (sensor.home_assistant_energy_today * cost_of_power_from_electric_company)| float }}

thank you… I wasn’t sure if it needs to be the sensor.home_assistant_power and I use the intergration sensor to convert to kWh, or if the daily usage one would work correctly…

With the usage you posted 0.033 kWh and a electrical rate of 0.10256 per kWh, you’d have a total cost of 0.00338448.

That’s my going rate for summer power usage here $0.10256 / kWh.

I wish my unit price was that low… mine is 16.653p uk pence :slight_smile:

Does your power company charge you a delivery fee too? Mine adds an extra $100/mo for delivery fees. :angry:

yep called Standing charge of 18.2805p/day