MrSleeps / Juwel-HeliaLux-Home-Assistant-Custom-Component

A custom component for Home Assistant to monitor your Juwel HeliaLux light states
Apache License 2.0
10 stars 1 forks source link

Getting name 'STATE_UNKNOWN' is not defined on start #3

Closed Nirostar closed 2 years ago

Nirostar commented 2 years ago

Unfortunately I get this problem `Logger: homeassistant.components.sensor Source: custom_components/juwel_helialux/sensor.py:128 Integration: Sensor (documentation, issues) First occurred: 15:36:02 (5 occurrences) Last logged: 15:36:03

juwel_helialux: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in async_device_update await task File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/juwel_helialux/sensor.py", line 128, in update self._state = STATE_UNKNOWN NameError: name 'STATE_UNKNOWN' is not defined `

MrSleeps commented 2 years ago

Yeah something has broken with the updates to Home Assistant, I'm away from home so won't be able to look at this for another week or so

Nirostar commented 2 years ago

Okay, maybe I'll have time to file a PR.

MrSleeps commented 2 years ago

Turns out you can do wonders with your phone these days.

The latest update has fixed it on my home install