Hi there, since a while PVOutput doesn’t give any info on HA, is something changed by the latest updates or something?
my code:
- platform: pvoutput
system_id: myid
api_key: myapireadkey
- platform: template
sensors:
power_consumption:
value_template: "{% if is_state_attr('sensor.pvoutput', 'power_consumption', 'NaN') %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_consumption') }}{% endif %}"
friendly_name: "Using"
unit_of_measurement: "Watt"
energy_consumption:
value_template: '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}'
friendly_name: "Used"
unit_of_measurement: "kWh"
power_generation:
value_template: '{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_generation") }}{% endif %}'
friendly_name: "Generating"
unit_of_measurement: "Watt"
energy_generation:
value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr("sensor.pvoutput", "energy_generation")|float/1000) }}{% endif %}'
friendly_name: "Generated"
unit_of_measurement: "kWh"