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

Dishwasher all entities become unavailable / keyError #179

Open
anthfarr opened this issue Mar 7, 2024 · 2 comments
Open

Dishwasher all entities become unavailable / keyError #179

anthfarr opened this issue Mar 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@anthfarr
Copy link

anthfarr commented Mar 7, 2024

Describe the bug
Dishwasher controls, sensors and everything else are unavailable.
When reloading the integration, some data is shown for up to 1min, then everything changes to unavailable.

To Reproduce
Go to Settings -> Devices & Services -> Haier Hon -> Dishwasher device and observe all sensors.
Reload the integration and check logs.

Expected behavior
Sensors should provide the data and should not go to unavailable after 1 min.

Screenshots

Environment (please complete the following information):

  • Home Assistant Version: 2024.2.5
  • hOn Integration Version 0.13.0
  • pyhOn Version 0.13.1

Additional context

  • My washing machine and tumble dryer work fine!
  • In the h0n app, the dishwasher also works fine.

Home Assistant Logs

Logger: custom_components.hon.hon
Source: helpers/update_coordinator.py:313
Integration: Haier hOn ([documentation](https://github.com/Andre0512/hon/), [issues](https://github.com/Andre0512/hon/issues))
First occurred: 11:28:35 AM (14 occurrences)
Last logged: 11:44:22 AM

Unexpected error fetching 34-b4-72-9c-64-74 data: 'delayTime'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hon/hon.py", line 62, in _async_update_data
    return await self._device.update()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyhon/appliance.py", line 207, in update
    self.sync_params_to_command("settings")
  File "/usr/local/lib/python3.12/site-packages/pyhon/appliance.py", line 268, in sync_params_to_command
    setting = command.settings[key]
              ~~~~~~~~~~~~~~~~^^^^^
KeyError: 'delayTime'
Logger: homeassistant.components.select
Source: helpers/entity_platform.py:344
Integration: Select ([documentation](https://www.home-assistant.io/integrations/select), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+select%22))
First occurred: 11:28:35 AM (3 occurrences)
Last logged: 11:39:20 AM

Error while setting up hon platform for select
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hon/hon.py", line 62, in _async_update_data
    return await self._device.update()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyhon/appliance.py", line 207, in update
    self.sync_params_to_command("settings")
  File "/usr/local/lib/python3.12/site-packages/pyhon/appliance.py", line 268, in sync_params_to_command
    setting = command.settings[key]
              ~~~~~~~~~~~~~~~~^^^^^
KeyError: 'delayTime'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/hon/select.py", line 207, in async_setup_entry
    await entity.coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 285, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady: 'delayTime'
Logger: pyhon.hon
Source: custom_components/hon/__init__.py:41
Integration: Haier hOn ([documentation](https://github.com/Andre0512/hon/), [issues](https://github.com/Andre0512/hon/issues))
First occurred: 11:28:33 AM (3 occurrences)
Last logged: 11:39:18 AM

Device data - {'fwVersion': '1.8.0', 'applianceTypeId': 9, 'firstEnrollment': False, 'attributes': {'acuVersion': '04.02.00', 'chipset': '0', 'dictionaryId': '281', 'eppParserSet': '1', 'fwLabel': 'iotfw_ec3', 'lang': 'it-IT', 'uiVersion': '01.06.01'}, 'applianceModelId': 12727, 'series': 'h20', 'firstEnrollmentTBC': False, 'code': '32901642', 'SK': 'app#34-b4-72-9c-64-74', 'macAddress': '34-b4-72-9c-64-74', 'eepromName': '70027648', 'applianceId': '34-b4-72-9c-64-74#2024-03-07T09:14:47Z', 'id': 12727, 'modelName': 'HI 6C4S1PTA-80', 'applianceTypeName': 'DW', 'connectivity': 'wifi|ble', 'serialNumber': '3290164223310162', 'enrollmentDate': '2024-03-07T09:14:47.173Z', 'sfPersonAccountId': '001R200000CpnuAIAR', 'brand': 'hoover', 'lastUpdate': '2024-03-07T09:14:56Z', 'eepromId': 7494, 'applianceStatus': 1, 'coords': {'lng': 14.4782432, 'lat': 35.888395}, 'PK': 'user#eu-west-1:c0f806c3-fa1a-cddd-5166-24359280033f', 'sections': {'chatbot': True, 'ecoDelayStart': True}, 'topics': {'publish': [], 'subscribe': ['$aws/events/presence/disconnected/34-b4-72-9c-64-74', '$aws/events/presence/connected/34-b4-72-9c-64-74', 'haier/things/34-b4-72-9c-64-74/event/appliancestatus/update', 'haier/things/34-b4-72-9c-64-74/event/discovery/update']}}

Device Log
DeviceLog.txt

Data Archive
dw_12727.zip

@anthfarr anthfarr added the bug Something isn't working label Mar 7, 2024
@anthfarr anthfarr changed the title Dishwasher all entities become unavailable Dishwasher all entities become unavailable / keyError Mar 7, 2024
@nunopicado
Copy link

~Same issue has shown up today for my tumble dryer, after updating the integration to the latest version.
Entities detecting tumble dryer status and remote control on/off are working, but every other entity just returns 'unavailable'.

Debug log does have a few entries for HOn, but to be honest I have no ideia if this may be the problem.
One that raised an eyebrow was:

2024-03-13 15:09:55.018 WARNING (MainThread) [py.warnings] /config/custom_components/hon/hon.py:163: SyntaxWarning: invalid escape sequence '='

home-assistant_hon_2024-03-13T23-47-03.294Z.log

HOn Device

@pawellygan
Copy link

pawellygan commented Mar 14, 2024

I can confirm, the same here for the washer and dryer.

After deleting and re-adding integration only a few sensors left
Screenshot 2024-03-14 at 09 47 33

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

No branches or pull requests

4 participants