StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
620 stars 111 forks source link

[BUG]Error receiving CoAP UDP #558

Open vdiogo opened 3 years ago

vdiogo commented 3 years ago

Environment

Describe the bug

Getting an error in the Log and can't understand

Steps to Reproduce

No specific action done

Expected behavior

Not to have the error

Screenshots

Traceback/Error logs

Logger: pyShelly Source: helpers/entity.py:421 First occurred: 29 de abril de 2021 23:24:43 (132779 occurrences) Last logged: 11:01:00

Error receiving CoAP UDP, , Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pyShelly/coap.py", line 187, in _loop self._root.update_block(device_id, device_type, File "/usr/local/lib/python3.8/site-packages/pyShelly/init.py", line 307, in update_block block.update_coap(data, ipaddr) File "/usr/local/lib/python3.8/site-packages/pyShelly/block.py", line 111, in update_coap self.raise_updated() File "/usr/local/lib/python3.8/site-packages/pyShelly/base.py", line 45, in raise_updated callback(self) File "/config/custom_components/shelly/block.py", line 68, in _updated self._update_ha_state() File "/config/custom_components/shelly/block.py", line 60, in _update_ha_state self.schedule_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 421, in schedule_update_ha_state assert self.hass is not None AssertionError Error update loop, , Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pyShelly/init.py", line 334, in _update_loop block.check_available() File "/usr/local/lib/python3.8/site-packages/pyShelly/block.py", line 168, in check_available self.raise_updated(True) File "/usr/local/lib/python3.8/site-packages/pyShelly/base.py", line 45, in raise_updated callback(self) File "/config/custom_components/shelly/block.py", line 68, in _updated self._update_ha_state() File "/config/custom_components/shelly/block.py", line 60, in _update_ha_state self.schedule_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 421, in schedule_update_ha_state assert self.hass is not None AssertionError Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pyShelly/coap.py", line 187, in _loop self._root.update_block(device_id, device_type, File "/usr/local/lib/python3.8/site-packages/pyShelly/init.py", line 307, in update_block block.update_coap(data, ipaddr) File "/usr/local/lib/python3.8/site-packages/pyShelly/block.py", line 111, in update_coap self.raise_updated() File "/usr/local/lib/python3.8/site-packages/pyShelly/base.py", line 45, in raise_updated callback(self) File "/config/custom_components/shelly/block.py", line 68, in _updated self._update_ha_state() File "/config/custom_components/shelly/block.py", line 60, in _update_ha_state self.schedule_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 421, in schedule_update_ha_state assert self.hass is not None AssertionError



## Additional context
<!--
  Add any other context about the problem here.
-->
apeeters commented 3 years ago

I see the same stacktrace on 0.2.2.