Closed rik246810 closed 2 years ago
Hi, you have to set device_class and state_class in customize.yaml
sensor.apsystems_energy_day:
device_class: energy
state_class: total_increasing
That did the trick! Cool cool!
Now i'm going to look if it's possible to inport the total generated power into home assistant.
Hi,
I can see the sensors ( 5 sensors, 1 date sensor,2 kwh and 2 kw sensors from developer menu, and the values are being filled
In my separate config file I put this: `sensor.apsystems_energy_day: device_class: energy state_class: total_increasing
sensor.apsystems_energy_latest: device_class: energy
sensor.apsystems_energy_total: device_class: energy
sensor.apsystems_power_max_day: device_class: energy
sensor.apsystems_power_latest: device_class: energy`
I can still see nothing to add in my energy dashboard. can someone explain what I am doing wrong?
Another way is to create a Template Sensor that use the original sensor as reference:
To do that, put this lines in the configuration.yaml
template:
- sensor:
- name: "Energy APS Day MOD"
unit_of_measurement: 'kWh'
state: >
{{ (states("sensor.apsystems_energy_day") | float) | round(2) }}
device_class: energy
state_class: total_increasing
attributes:
last_reset: '1970-01-01T00:00:00+00:00'
I made a template sensor as you describbed above and I think it works, I had to wait until today to get the right values.
I didn't use last_reset: '1970-01-01T00:00:00+00:00'
attribute though, seems to work just fine without it.
Hello, I'm not able to see the
sensor.apsystems energy day
in the energy dashboard. How can I fix this?