Replies: 4 comments 5 replies
-
I haven't really looked at the templates since I don't use them personally. But I would say make sure the sensors are set to the correct unit the template is expecting, or update the template to the units you are using. Sensor entities can be customized between different units in the supported device class: https://www.home-assistant.io/integrations/sensor/ https://www.home-assistant.io/docs/configuration/customizing-devices/ |
Beta Was this translation helpful? Give feedback.
-
`` - sensor:
sensor:
utility_meter: solar_panel_production_daily: solar_imported_power_weekly: solar_imported_power_monthly: solar_imported_power_yearly: |
Beta Was this translation helpful? Give feedback.
-
I have multiplied the sensor twice by 1000 and performed an intermediate operation several times:
All measured values and egg units are now Best regards, Tom |
Beta Was this translation helpful? Give feedback.
-
The templates are on a Wiki page - just edit it? |
Beta Was this translation helpful? Give feedback.
-
Hello WillCodeForCats,
A great job, thank you very much, a huge help to integrate the PV system from Solaredge into HomeAssistant!
However, I believe that an error has crept in:
You are using some sensors that originally have different units:
"name: "Power - Grid Import"
unit_of_measurement: "W" "
is not correct, as the sensor "solaredge_m1_ac_power" used outputs the unit kW. As a result, subsequent calculations with this sensor are incorrect if they are carried out with a sensor with the original unit "W".
It is necessary to multiply all sensors with the original unit "kW" by 1000 so that the calculations are correct.
This applies to:
sensor.solaredge_m1_ac_power
This can also cause subsequent calculations to be incorrect:
z. B.
"name: "Power - PV - Load"
unit_of_measurement: "W"
device_class: "power"
state_class: "measurement"
# What is being generated less what is going to the battery and what is being exported, always positive.
state: "{{ max([float(states('sensor.power_solar_generation'), 0) - float(states('sensor.power_pv_battery'), 0) - float(states('sensor.power_grid_export'), 0), 0]) }}"
The previously created sensor "sensor.power_grid_export" has assumed the unit W, but is too low by a factor of 1000 because it had the unit kW in the original sensor.
This means that all sensors that originate from calculations with the "sensor.solaredge_m1_ac_power" sensor are currently not calculated correctly.
I think this needs to be changed in the yaml:
{{ min([float(states('sensor.solaredge_m1_ac_power'), 0), 0]) | abs() * 1000 }}
Am I perhaps right with my comment?
Best regards
Thomas
Beta Was this translation helpful? Give feedback.
All reactions