Integration fails to reload after adding Hoover H-Dish 500 #134

Open
opened 2023-12-03 12:56:12 +01:00 by the-jameen · 1 comment
the-jameen commented 2023-12-03 12:56:12 +01:00 (Migrated from github.com)

Describe the bug
Having used hon integration for some time with my washing machine and tumbledryer, I recently purchased a Hoover H-dish 500 dishwasher. As soon as I added this device to the hOn app and reloaded the HA integration, it produced an error.

To Reproduce
Steps to reproduce the behavior:

  1. Add H-Dish 500 Dishwasher to hOn app
  2. Reload integration within HA
  3. HA integrations shows "failed to set-up"
  4. Removing Dishwasher from hOn app and then reloading HA integration fixes issue

Expected behavior
Integration works with HA integration

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Home Assistant Version: 2023.11.3
  • hOn Integration Version : v0.10.1
  • pyhOn Version manually tested and same error with v0.15.14

Additional context

Home Assistant Logs

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/hon/init.py", line 32, in async_setup_entry
hon = await Hon(
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 66, in create
await self.setup()
File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 104, in setup
await self._create_appliance(appliance, self.api)
File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 84, in _create_appliance
await asyncio.gather(
File "/usr/local/lib/python3.11/site-packages/pyhon/appliance.py", line 180, in load_commands
await command_loader.load_commands()
File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 60, in load_commands
self._get_commands()
File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 101, in _get_commands
if command := self._parse_command(data, name):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 124, in _parse_command
if category := self._parse_categories(data, command_name):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 134, in _parse_categories
if command := self._parse_command(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 117, in _parse_command
return HonCommand(
^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyhon/commands.py", line 40, in init
self._load_parameters(attributes)
File "/usr/local/lib/python3.11/site-packages/pyhon/commands.py", line 94, in _load_parameters
for name, data in items.items():
^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'items'

**Describe the bug** Having used hon integration for some time with my washing machine and tumbledryer, I recently purchased a Hoover H-dish 500 dishwasher. As soon as I added this device to the hOn app and reloaded the HA integration, it produced an error. **To Reproduce** Steps to reproduce the behavior: 1. Add H-Dish 500 Dishwasher to hOn app 2. Reload integration within HA 3. HA integrations shows "failed to set-up" 4. Removing Dishwasher from hOn app and then reloading HA integration fixes issue **Expected behavior** Integration works with HA integration **Screenshots** If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** - Home Assistant Version: 2023.11.3 - hOn Integration Version : v0.10.1 - pyhOn Version manually tested and same error with v0.15.14 **Additional context** **Home Assistant Logs** -------------------------- Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hon/__init__.py", line 32, in async_setup_entry hon = await Hon( ^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 66, in create await self.setup() File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 104, in setup await self._create_appliance(appliance, self.api) File "/usr/local/lib/python3.11/site-packages/pyhon/hon.py", line 84, in _create_appliance await asyncio.gather( File "/usr/local/lib/python3.11/site-packages/pyhon/appliance.py", line 180, in load_commands await command_loader.load_commands() File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 60, in load_commands self._get_commands() File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 101, in _get_commands if command := self._parse_command(data, name): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 124, in _parse_command if category := self._parse_categories(data, command_name): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 134, in _parse_categories if command := self._parse_command( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/command_loader.py", line 117, in _parse_command return HonCommand( ^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyhon/commands.py", line 40, in __init__ self._load_parameters(attributes) File "/usr/local/lib/python3.11/site-packages/pyhon/commands.py", line 94, in _load_parameters for name, data in items.items(): ^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'items' --------------------------
the-jameen commented 2024-01-11 11:29:56 +01:00 (Migrated from github.com)

Thanks @Andre0512, integration appears to load successfully now

Thanks @Andre0512, integration appears to load successfully now
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#134
No description provided.