pawlizio / my_velux

Custom component of velux integration for Home Assistant
31 stars 9 forks source link

Error in data_received pyvlx #33

Closed fabir-git closed 11 months ago

fabir-git commented 11 months ago

After updating to the latest version 2.9.3 the previous issue is gone (not able to address multiple shutters at once).

HA-Version: 2023.8.4

The shutters work fine now, but the following error message is flooding the logs.

It seems to be a pyvlx issue but I don't know if it is only in your fork or in the main version. That's why I posted the issue here.

If there is anything I can help with, just hit me up.

Source: /usr/local/lib/python3.11/site-packages/pyvlx/connection.py:59
First occurred: 13:56:51 (2893 occurrences)
Last logged: 19:22:49

Error in data_received
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/pyvlx/connection.py", line 55, in data_received
    frame = frame_from_raw(raw)
            ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyvlx/api/frame_creation.py", line 53, in frame_from_raw
    frame.from_payload(payload)
  File "/usr/local/lib/python3.11/site-packages/pyvlx/api/frames/frame_node_state_position_changed_notification.py", line 47, in from_payload
    self.state = OperatingState(payload[1])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 711, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1136, in __new__
    raise exc
  File "/usr/local/lib/python3.11/enum.py", line 1113, in __new__
    result = cls._missing_(value)
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyvlx/const.py", line 588, in _missing_
    return cls.UNDEFINED
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 783, in __getattr__
    raise AttributeError(name) from None
AttributeError: UNDEFINED 
pawlizio commented 11 months ago

Oh, this is probably related to a PR which I merged to my pyvlx which was declared WIP

pawlizio commented 11 months ago

Hi, after reboot of HA this should be fixed.

fabir-git commented 11 months ago

I thought I already rebooted twice, but the error is gone now. Thanks 👍