homeassistant-goecharger
homeassistant-goecharger copied to clipboard
cannot add integration anymore v0.25.0
After the update to version v0.25.0 I cannot add the integration anymore
go to new integration try to add goe integration fill out everything press enter
- home-assistant []
- Charger Hardware: [v3]
- Charger Firmware Version: [0.53.1]
- Plugin Version: [0.25]
Additional context error message: User input malformed: expected float for dictionary value @ data['correction_factor']
I have Theo same Error
same here
I've upgraded from 0.24.1 to 0.25.0 (so the integration was upgraded not freshly installed) and I have the following error during the initialization of the integration:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/goecharger/sensor.py", line 164, in async_setup_entry
async_add_entities(_create_sensors_for_charger(chargerName, hass, config[CONF_CORRECTION_FACTOR]))
KeyError: 'correction_factor'
When trying to edit the configuration in the backend, following error message is shown:
The response of the related XHR request looks the following:
The failed flow initialization is logged in the backend as well:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 222, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 219, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 244, in post
return await super().post(request)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 205, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 226, in _async_init
flow.hass = self.hass
AttributeError: 'coroutine' object has no attribute 'hass'
The problems are related to the recent changes regarding correction_factor
configuration variable.
Please test version 0.25.1
@cathiele now it works - can you please advise how the factor should be used (guess it should be a factor, so 1.07 would increase the read value by 7%)? the input box during setup is kinda bugged
@cathiele Integration itself works now and initializes correctly, but the config flow (in my case after upgrading, not a fresh install) is still broken. I'll have a look at this tonight.
finally i had time to fix it. 0.25.2 should have a working config flow.
Older Chargers, like mine V2 charger, have incorrect power calculations. mine is way to low. So with setting the correction factor to values other than 1.0 you can correct the api values by a factor. the uncorrected values are still available as the original attributes.