thanks for this nice forum here. I’m doing my first steps with home assistant so maybe the result is very easy, I only didn’t get the solution. so would be good if you can give me a hint.
I’m having a current measuring with big energy at a bulidung. 80A.
This measurement ist done by a current converter because it’s not directly measureed. (Wandlermessung)
This factor has to be added afterwards. So i’m getting the correct value via tasmota and a smart meter interface.
My questions is where i can add a factor (in my case of 15) for getting the correct kwh result vom the energymeter.
thanks in advance for helping to find this option.
Hello, you can create a sensor with the value from the energy meter (your existing sensor) multiplied by 15…
but make sure you measure an energy (KWh) and not a power (W or KW)
Example for energy (I am converting gas consumption from m3 to KWh), this sensor (called sensor.smappee_usage_gaz_c_kwh) has to be defined in template.yaml :
- name: "Smappee Usage Gaz C Kwh"
state_class: total_increasing
device_class: energy
unit_of_measurement: "kWh"
state: >
{{ states('sensor.consommation_gaz_m3_jour') | float(default=0) * 11.2681 | round(3) }}
unique_id: "Smappee_Usage_Gaz_C_KWH"
One question again. the multiplier is now very easy.
i’ve added the following to my configuration.yaml but the new template sensor is not showing up in my eneergy dashboard.
template:
- sensor:
- name: "Verbrauch"
unique_id: 8f43aa7e-86e3-11ed-a1eb-0242ac120002
device_class: energy
state_class: total_increasing
unit_of_measurement: "kWh"
state: >
{% set raw_value = states('sensor.tasmota_total_in') | float %}
{% set factor = 15 | float %}
{{ states if states in [0, '0.0', 'unknown', 'unavailable', 'none'] else (raw_value * factor)| float}}