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

[Issue]: Error while setting up daikin_onecta platform for select #228

Closed
hannes3510 opened this issue Jun 24, 2024 · 18 comments
Closed

[Issue]: Error while setting up daikin_onecta platform for select #228

hannes3510 opened this issue Jun 24, 2024 · 18 comments

Comments

@hannes3510
Copy link

hannes3510 commented Jun 24, 2024

Logger: homeassistant.components.select
Source: helpers/entity_platform.py:366
integration: Select (documentation, issues)
First occurred: 17:18:30 (1 occurrences)
Last logged: 17:18:30

Error while setting up daikin_onecta platform for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/daikin_onecta/select.py", line 31, in async_setup_entry
    sensors.append(DaikinScheduleSelect(device, coordinator, embedded_id, management_point_type, "schedule"))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/select.py", line 53, in __init__
    self.update_state()
  File "/config/custom_components/daikin_onecta/select.py", line 62, in update_state
    self._attr_options = self.get_options()
                         ^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/select.py", line 145, in get_options
    readableName = scheduledict["value"]["modes"][currentMode]["schedules"][scheduleName]["name"]["value"]
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'
@jwillemsen
Copy link
Owner

jwillemsen commented Jun 24, 2024

Please in HA download and attach your device diagnostics, looks your device has schedule capabilities which are not as expected

@jwillemsen
Copy link
Owner

With a device diagnostics this should be easy to fix @hannes3510

@hannes3510
Copy link
Author

Like this?

@jwillemsen
Copy link
Owner

Yes, thanks

@jwillemsen
Copy link
Owner

Do you now see the same error, I try to use your json in the test framework, but no error when I use it, are all states of the daikin device the same as when you reported the error?

@hannes3510
Copy link
Author

havent seen this error since yesterday. let me try to restart HA

@hannes3510
Copy link
Author

hannes3510 commented Jun 25, 2024

Logger: homeassistant.components.select
Source: helpers/entity_platform.py:366
integration: Select (documentation, issues)
First occurred: 14:07:57 (1 occurrences)
Last logged: 14:07:57

Error while setting up daikin_onecta platform for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/daikin_onecta/select.py", line 31, in async_setup_entry
    sensors.append(DaikinScheduleSelect(device, coordinator, embedded_id, management_point_type, "schedule"))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/select.py", line 53, in __init__
    self.update_state()
  File "/config/custom_components/daikin_onecta/select.py", line 62, in update_state
    self._attr_options = self.get_options()
                         ^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikin_onecta/select.py", line 145, in get_options
    readableName = scheduledict["value"]["modes"][currentMode]["schedules"][scheduleName]["name"]["value"]
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'

@hannes3510
Copy link
Author

seems to happen on startup
home-assistant_daikin_onecta_2024-06-25T12-11-34.002Z.log

@jwillemsen
Copy link
Owner

OPk, I think you need to add the integration diagnostics, looks you have multiple Daikin devices and the one you attached doesn't have this issue

@hannes3510
Copy link
Author

i will , first going to reinstall with hacs, i did it manually first time, if it returns i will add the 5 logs (5 devices)

@jwillemsen
Copy link
Owner

Under /config/integrations/integration/daikin_onecta you should be able to download the diagnostics for the integration, contains the data of all devices

@jwillemsen
Copy link
Owner

Under the daikin_onecta integration you can download the integration diagnostics which contains the data of all daikin devices, that is easier, but the error coming from the master device

@hannes3510
Copy link
Author

The master is another type of unit, https://www.daikin.com/products/ac/lineup/skyair, connected with a wifi module: WiFi-adapter voor Daikin airconditioning
BRP069B42

@jwillemsen
Copy link
Owner

@jwillemsen
Copy link
Owner

Ok, does it work now?

@hannes3510
Copy link
Author

yes, you got the bug, good job. Thank you for making my airco integration a lot easier.

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

2 participants