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

custom_components.tahoma.config_flow - Unexpected exception - ValueError: No ui Class #99

Closed
jensihnow opened this issue Jul 2, 2020 · 8 comments · Fixed by #101
Closed
Labels
bug Something isn't working

Comments

@jensihnow
Copy link

Describe the bug

Found this custom integration while searching for issues related to home-assistant/core#37291.
Anyways, haven't used it before and running into a config_flow issue after submitting my credentials:

[%key:common::config_flow::error::unknown%]

To Reproduce
Steps to reproduce the behavior:

  1. Go to Integrations and add the integration
  2. Click on submit after inserting credentials
  3. See error

Expected behavior

With this error I'm unable to activate/configure the component.

Screenshots

grafik

Environment (please complete the following information):

  • Home Assistant version: 0.112.0
  • Platform: -

Device: -

("No ui Class: " + debug_output)
ValueError: No ui Class: {
"creationTime": 1472213846000, 
"lastUpdateTime": 1472213846000, 
"label": "ZWAVE (2#1)", 
"deviceURL": "zwave://xxxx-xxxx-xxxx/2#1", 
"shortcut": false, 
"controllableName": "zwave:ZWaveOccupancySensor", 
"definition": {"commands": [], "states": [], "dataProperties": [], "qualifiedName": "zwave:ZWaveOccupancySensor", "type": "UNKNOWN"},
"available": false, "enabled": true, "placeOID": "xxx", "type": 0, "oid": "xxx-xxx-xxx-xxx-xxx"}

Additional context

Exception:

Traceback (most recent call last):
  File "/config/custom_components/tahoma/config_flow.py", line 92, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/config/custom_components/tahoma/config_flow.py", line 48, in validate_input
    await hass.async_add_executor_job(controller.get_setup)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tahoma/tahoma_api.py", line 238, in get_setup
    self._get_setup(result)
  File "/config/custom_components/tahoma/tahoma_api.py", line 248, in _get_setup
    device = Device(self, device_data)
  File "/config/custom_components/tahoma/tahoma_api.py", line 615, in __init__
    raise ValueError("No ui Class: " + debug_output)
ValueError: No ui Class: {
"creationTime": 1472213846000, 
"lastUpdateTime": 1472213846000, 
"label": "ZWAVE (2#1)", 
"deviceURL": "zwave://xxxx-xxxx-xxxx/2#1", 
"shortcut": false, 
"controllableName": "zwave:ZWaveOccupancySensor", 
"definition": {"commands": [], "states": [], "dataProperties": [], "qualifiedName": "zwave:ZWaveOccupancySensor", "type": "UNKNOWN"},
"available": false, "enabled": true, "placeOID": "xxx", "type": 0, "oid": "xxx-xxx-xxx-xxx-xxx"}```
@jensihnow jensihnow added the bug Something isn't working label Jul 2, 2020
@vlebourl
Copy link
Collaborator

vlebourl commented Jul 2, 2020

Thanks for the report, I'll have a look tomorrow!

@vlebourl
Copy link
Collaborator

vlebourl commented Jul 2, 2020

We actually weren't planning on supporting zwave devices as there is a native zWave integration in HA. But I guess it could change.
And this is still a bug in the api...

@jensihnow
Copy link
Author

I actually don’t care about the zWave support, it just broke my setup of the integration. Thanks!

@iMicknl
Copy link
Owner

iMicknl commented Jul 2, 2020

@vlebourl this issue is probably introduced by adding climate to the config flow. Would be good to check there loosely for uiclass. Didn't know that uiclass could be empty.

vlebourl added a commit that referenced this issue Jul 3, 2020
vlebourl added a commit that referenced this issue Jul 3, 2020
@vlebourl
Copy link
Collaborator

vlebourl commented Jul 3, 2020

Sorry if I got misunderstood. I was not implying I wouldn't fix it. IMHO, this is a misbehaving of the API that should raise exception at that stage.

@vlebourl
Copy link
Collaborator

vlebourl commented Jul 3, 2020

can you try branch fix-99?

@jensihnow
Copy link
Author

Just to confirm, switched over to your custom integration without any issues a few minutes ago. Minor piece was io:SomfyContactIOSystemSensor sensor switching from sensor to binary_sensor. Guess this is a breaking change when this one will be released.

@iMicknl
Copy link
Owner

iMicknl commented Jul 3, 2020

Just to confirm, switched over to your custom integration without any issues a few minutes ago. Minor piece was io:SomfyContactIOSystemSensor sensor switching from sensor to binary_sensor. Guess this is a breaking change when this one will be released.

Great to hear! Indeed that is marked as a change in our changelog, when it will be published to core, we will list the breaking changes for sure. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants