Closed pove closed 2 years ago
pvpc_hourly_pricing documentation pvpc_hourly_pricing source (message by IssueLinks)
Hey there @azogue, mind taking a look at this issue as it has been labeled with an integration (pvpc_hourly_pricing
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I have the same problem.
Tried restarting HA, deleting the integration and adding it again, but it didn't solve the issue.
My log:
Logger: homeassistant.config_entries
Source: components/pvpc_hourly_pricing/__init__.py:142
First occurred: 10:59:15 (1 occurrences)
Last logged: 10:59:15
Error setting up entry PVPC for pvpc_hourly_pricing
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 313, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/pvpc_hourly_pricing/__init__.py", line 107, in async_setup_entry
coordinator = ElecPricesDataUpdateCoordinator(hass, entry)
File "/usr/src/homeassistant/homeassistant/components/pvpc_hourly_pricing/__init__.py", line 142, in __init__
self.api = PVPCData(
TypeError: __init__() got an unexpected keyword argument 'session'
Hi @pove and @jfisbein,
Looks like the aiopvpc
library didn't update as expected to v3.0.0, which is strange if you're using Home Assistant OS
If you have access to the python environment where HA Core is running, there are some things to check (paths are for the docker container running HA Core in HA OS):
pip list | grep aiopvpc
should show aiopvpc 3.0.0
cat /usr/src/homeassistant/homeassistant/components/pvpc_hourly_pricing/manifest.json
should show the latest version of the integration manifest, containing the line "requirements": ["aiopvpc==3.0.0"],
/usr/local/lib/python3.9/site-packages/
, with a aiopvpc-3.0.0.dist-info
subfolderAlso, check if there is a deps
folder in the config folder. If it exists, it should be empty.
And double-check the custom_components
folder to remove any custom install?
Hi and thanks @azogue, I have used the SSH Add-on and this command to access bash:
docker exec -it homeassistant /bin/bash
From here, I have done the checks you proposed, but it seems everything is ok, anything else I could check?
Here are the checks so far:
aiopvpc 3.0.0
"domain": "pvpc_hourly_pricing",
"name": "Spain electricity hourly pricing (PVPC)",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/pvpc_hourly_pricing",
"requirements": ["aiopvpc==3.0.0"],
"codeowners": ["@azogue"],
"quality_scale": "platinum",
"iot_class": "cloud_polling"
aiopvpc
aiopvpc-3.0.0.dist-info
INSTALLER LICENSE METADATA RECORD REQUESTED WHEEL
ls /config/deps
empty
ls /config/custom_components/
alexa_media hacs
edata ytube_music_player
Same as @pove .
In /usr/local/lib/python3.9/site-packages/aiopvpc, it is pvpc_data.py with the lines:
class PVPCData:
......
def __init__(
self,
*,
session: aiohttp.ClientSession,
Maybe edata custon component? I have it also installed...
https://github.com/uvejota/python-edata/blob/dev/requirements.txt ->
aiopvpc==2.2.0
Working
So it seems the problem is e-data Custom Component...
Confirmed. e-data custom component is causing the problem. And as suggested here (https://github.com/uvejota/homeassistant-edata/issues/37#issuecomment-1000874211), just disabling "experimental" config and everything works as expected.
The problem
Integration is not setting up.
What version of Home Assistant Core has the issue?
core-2021.12.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
PVPC Hourly Pricing
Link to integration documentation on our website
https://www.home-assistant.io/integrations/pvpc_hourly_pricing/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response