KeyError: 'extraRinse1' after update to 0.7.X #38

Closed
opened 2023-05-08 11:13:58 +02:00 by KiraPC · 9 comments
KiraPC commented 2023-05-08 11:13:58 +02:00 (Migrated from github.com)

After the latest update, I'm receiving the issue

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 341, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 142, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 401, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 568, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 632, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _stringify_state
    if (state := self.state) is None:
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1016, in state
    if (is_on := self.is_on) is None:
  File "/config/custom_components/hon/switch.py", line 360, in is_on
    setting = self._device.settings[self.entity_description.key]
KeyError: 'extraRinse1'

This avoid the component to load the other appliance attributes and all the attributes appear unavailable.

After the latest update, I'm receiving the issue ``` Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 193, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 341, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 142, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 401, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 568, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 632, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1016, in state if (is_on := self.is_on) is None: File "/config/custom_components/hon/switch.py", line 360, in is_on setting = self._device.settings[self.entity_description.key] KeyError: 'extraRinse1' ``` This avoid the component to load the other appliance attributes and all the attributes appear unavailable.
Andre0512 commented 2023-05-08 12:45:07 +02:00 (Migrated from github.com)

Hi, did you test also the v0.7.2? Thought it was fixed there 🤔

Hi, did you test also the `v0.7.2`? Thought it was fixed there 🤔
KiraPC commented 2023-05-08 12:46:30 +02:00 (Migrated from github.com)

Yes, i've installed the 0.7.2

Yes, i've installed the 0.7.2
Andre0512 commented 2023-05-08 14:13:20 +02:00 (Migrated from github.com)

I have an idea where the problem is, I will fix that later today.

I have an idea where the problem is, I will fix that later today.
KiraPC commented 2023-05-08 14:33:00 +02:00 (Migrated from github.com)

No hurry. I'm using a local fix as a workaround.

Anyway the integration does not provide temperature and current program now.

No hurry. I'm using a local fix as a workaround. Anyway the integration does not provide temperature and current program now.
Andre0512 commented 2023-05-08 15:42:10 +02:00 (Migrated from github.com)

Sorry, I changed too much 🥴
Which device do you use? (appliancetype, brand, model)

Sorry, I changed too much 🥴 Which device do you use? (appliancetype, brand, model)
KiraPC commented 2023-05-08 15:43:19 +02:00 (Migrated from github.com)

It is a Candy WashDry RPW4966BWMR/1-S

It is a Candy WashDry RPW4966BWMR/1-S
Andre0512 commented 2023-05-08 19:51:02 +02:00 (Migrated from github.com)

I think the KeyError should be fixed now, can you please test v0.7.3-beta.2 to verify this? 🙂
I added the temperature sensor again, but which program entity are you missing? I changed the prCode to the correct name recently, do you mean this? Can't you see the new sensor or do you really need the prCode?

I think the `KeyError` should be fixed now, can you please test `v0.7.3-beta.2` to verify this? :slightly_smiling_face: I added the temperature sensor again, but which program entity are you missing? I changed the prCode to the correct name recently, do you mean this? Can't you see the new sensor or do you really need the prCode?
KiraPC commented 2023-05-09 09:54:06 +02:00 (Migrated from github.com)

OK, i tested the latest beta and working.

Which is the new prCode?

OK, i tested the latest beta and working. Which is the new prCode?
Andre0512 commented 2023-05-09 12:52:05 +02:00 (Migrated from github.com)

Thanks!
The key is now programName, here we have a look at the corresponding program and display now the program key (eg hqd_quick_dry) and if available the translation of the program name 🙂

Thanks! The key is now `programName`, [here we have a look at the corresponding program](https://github.com/Andre0512/pyhOn/blob/main/pyhon/appliances/td.py#L13-L15) and display now the program key (eg `hqd_quick_dry`) and if available the translation of the program name :slightly_smiling_face:
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xiconfjs/hon#38
No description provided.