Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot add integration anymore v0.25.0 #65

Open
r100gs opened this issue Apr 21, 2022 · 7 comments
Open

cannot add integration anymore v0.25.0 #65

r100gs opened this issue Apr 21, 2022 · 7 comments

Comments

@r100gs
Copy link

r100gs commented Apr 21, 2022

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']

@diegodanado
Copy link

I have Theo same Error

@stepir
Copy link

stepir commented Apr 21, 2022

same here

@temesinko
Copy link

temesinko commented Apr 21, 2022

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:

image

The response of the related XHR request looks the following:

image

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.

@cathiele
Copy link
Owner

Please test version 0.25.1

@stepir
Copy link

stepir commented Apr 21, 2022

@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

@temesinko
Copy link

@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.

@cathiele
Copy link
Owner

cathiele commented Oct 2, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants