core: PVOutput configuration flow fail
The problem
With the upgrade to core-2022.2.0b0 the migration of the old PVOutput configuration has not been successful and a new configuration dialog is presented which fails. Other auto migrations have been successful; sensibo, solax.
Log entry looks like is has been successful.
Logger: homeassistant.components.pvoutput
Source: components/pvoutput/sensor.py:139
Integration: PVOutput (documentation, issues)
First occurred: 4:16:08 PM (1 occurrences)
Last logged: 4:16:08 PM
Configuration of the PVOutput platform in YAML is deprecated and will be removed in Home Assistant 2022.4; Your existing configuration has been imported into the UI automatically and can be safely removed from your configuration.yaml file
But then unexpectedly the component is auto discovered:
But credentials are not accepted reporting ‘failed to connect’:
What version of Home Assistant Core has the issue?
core-2022.2.0b0
What was the last working version of Home Assistant Core?
core-2021.12.10
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
pvoutput
Link to integration documentation on our website
https://www.home-assistant.io/integrations/pvoutput
Example YAML snippet
Legacy YAML configuration:
- platform: pvoutput
system_id: 79392
api_key: XXXX
- 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"
### Anything in the logs that might be useful for us?
```txt
Enabled debug logging, but nothing else relevant reported.
2022-01-27 21:49:21 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'None' when rendering template '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-01-27 21:49:21 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'None' when rendering template '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-01-27 21:49:21 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'None' when rendering template '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr("sensor.pvoutput", "energy_generation")|float/1000) }}{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
2022-01-27 21:49:21 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'None' when rendering template '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr("sensor.pvoutput", "energy_generation")|float/1000) }}{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
### Additional information
_No response_
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 6
- Comments: 24 (14 by maintainers)
Thanks, that is helpful information. I can work with that.
No only a date with values results in data, empty or date of today give http 400 error I did a get without the headers to test.
Works: https://pvoutput.org/service/r2/getstatus.jsp?sid=xxx&key=xxx&d=20210227
Doesn’t work: (400, message=‘Bad Request’,) https://pvoutput.org/service/r2/getstatus.jsp?sid=xxx&key=xxx&d=20220211 https://pvoutput.org/service/r2/getstatus.jsp?sid=xxx&key=xxx
I didn’t noticed my upload script stopped working almost a year ago lol…