gvigroux / hon

Support of all Haier, Candy, Hoover appliances integrated in the official hOn mobile app. Direct access to all possible services and parameters
MIT License
118 stars 45 forks source link

Error when setting up sensor for Tumble Dryer #80

Closed MrSleeps closed 1 year ago

MrSleeps commented 1 year ago

Added the integration, logs in and finds my Tumble Dryer, however I only have two sensors (as mentioned in #70 )

Looking in the logs I get the error

Error while setting up hon platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/hon/sensor.py", line 120, in async_setup_entry
    appliances.extend([HonBaseProgram(hass, coordinator, entry, appliance)])
  File "/config/custom_components/hon/sensor.py", line 338, in __init__
    super().__init__(coordinator, appliance, "prCode", "Program")
  File "/config/custom_components/hon/base.py", line 143, in __init__
    self.coordinator_update()
  File "/config/custom_components/hon/sensor.py", line 347, in coordinator_update
    if program in TUMBLE_DRYER_PROGRAMS:
NameError: name 'TUMBLE_DRYER_PROGRAMS' is not defined
MrSleeps commented 1 year ago

Fixed it myself, have sent a pull request

gvigroux commented 1 year ago

Thanks :)