custom-components / sensor.owlintuition

A set of sensors to integrate the OWL Intuition devices network
MIT License
11 stars 9 forks source link

Getting an error in HA since doing the 2023.6.0 update #30

Closed BertrumUK closed 1 year ago

BertrumUK commented 1 year ago

image

Disabling the sensor config clears the error -

- platform: owlintuition

host: 192.168.1.154

port: 4321

mode: monophase

monitored_conditions:

#- electricity
#- solar
BertrumUK commented 1 year ago

Here are the logs `This error originated from a custom integration.

Logger: homeassistant.loader Source: custom_components/owlintuition/sensor.py:167 Integration: owlintuition (documentation) First occurred: 7:13:13 PM (1 occurrences) Last logged: 7:13:13 PM

Unexpected exception importing platform custom_components.owlintuition.sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 833, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 850, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1206, in _gcd_import File "", line 1178, in _find_and_load File "", line 1149, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/owlintuition/sensor.py", line 167, in @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine' `

BertrumUK commented 1 year ago

Look here

wcavanagh commented 1 year ago

Seeing the same here

orandaadnaro commented 1 year ago

Hi I keep dipping in and out of here and I'm not too sure if I understand what is going on here:

By commenting out in configuration.yaml does the owl stuff work or does it simply stop HA from crashing on a reboot when using the 2023.6.0 update.

Ive reverted to 2023.4.6 as suggested earlier, and this works for me.

BertrumUK commented 1 year ago

The Owl sensor does not work with 2023.6.0. I was just stating that I get no other HA errors when I disable the Owl sensor.

orandaadnaro commented 1 year ago

Any news about when Owl will catch up with these newer updates?

BertrumUK commented 1 year ago

Any news about when Owl will catch up with these newer updates?

This is nothing to do with Owl. The Code owner or someone who knows more about Python will right the fix shortly I am guessing.

shortbloke commented 1 year ago

Python 3.11 introduced in HA 2023.6.0 is likely to break a number of components. I looked at the release notes and decided to wait until I could build a second HA instance, rather than risk breaking stuff.

If @glpatcern doesn't get a chance, I may have time tomorrow to fix this up and submit a PR.

glpatcern commented 1 year ago

This definitely is a significant breaking change. Will see what I or @shortbloke can do, but until then I rather suggest to revert to the latest-1 release. I have myself another custom component and it will likely break as well with Python 3.11.

BTW I'm seriously thinking that we could contribute this integration to HA core. It would require some work to ease the config, but it will be supported by the community.

BertrumUK commented 1 year ago

I can confirm that removing line 167 "@asyncio.coroutine" fixes this issue (for now) 👍

wcavanagh commented 1 year ago

Where do we remove a line to get round this for now please?

BertrumUK commented 1 year ago

Where do we remove a line to get round this for now please?

As per my last update, remove line 167 in sensor,py and restart HA.

wcavanagh commented 1 year ago

Thank you