Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ha 2023.6.0 broke the integration #36

Closed
faxbio opened this issue Jun 7, 2023 · 11 comments
Closed

Ha 2023.6.0 broke the integration #36

faxbio opened this issue Jun 7, 2023 · 11 comments

Comments

@faxbio
Copy link

faxbio commented Jun 7, 2023

As soon as updating Ha It won t pass the reboot controls sayng that the yaml file has errors about extracting sensor attributes for every sensor i created using this custom integration

@Conundrum1911
Copy link

Same -- I had to comment/remark out all of mine to get past the errors. Hopefully this can be patched/fixed so we can use this add-on again.

@pilotak
Copy link
Owner

pilotak commented Jun 7, 2023

Can somebody please share the error log or propose a PR

@faxbio
Copy link
Author

faxbio commented Jun 7, 2023

Sorry, i cant. I m so fool to have rebooted even if ha said there were errors...and now i m trying to rebuild the system.i haVe no access right now...

@albatorsk
Copy link

albatorsk commented Jun 7, 2023

Can somebody please share the error log or propose a PR

Of course. Here's what home-assistant.log says:

EDIT: Oh my, even when using the "code" tags the log looks terrible. I have attached the log as a text file instead.
attributes-ha-2023.06.txt

@andnp
Copy link
Contributor

andnp commented Jun 7, 2023

Looks like the upgrade to python 3.11 is what caused the break. asyncio.coroutine was previously deprecated and is no longer supported in python 3.11.

I believe #37 fixes the issue (works on my machine, at least!)

@tefracky
Copy link

tefracky commented Jun 8, 2023

Here is a full error description:

The problem

In 2023.06, the attribute seems to stop working.

What version of Home Assistant Core has the issue?

core-2023.6.0

What was the last working version of Home Assistant Core?

core-2023.5.4

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

custom_components.attributes.sensor

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

sensor:
  - platform: attributes
    friendly_name: Temperatur Ist
    attribute: current_temperature
    unit_of_measurement: °C
    entities:
      - climate.arbeitszimmer
      - climate.bad
      - climate.esszimmer
      #- climate.floor
      - climate.gastezimmer
      - climate.kuche
      - climate.lego
      - climate.schlafzimmer_wand
      - climate.wc
      - climate.wohnzimmer
  
  - platform: attributes
    friendly_name: Temperatur Soll
    attribute: temperature
    unit_of_measurement: °C
    entities:
      - climate.arbeitszimmer
      - climate.bad
      - climate.esszimmer
      #- climate.floor
      - climate.gastezimmer
      - climate.kuche
      - climate.lego
      - climate.schlafzimmer_wand
      - climate.wc
      - climate.wohnzimmer

Anything in the logs that might be useful for us?

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.loader
Source: custom_components/attributes/sensor.py:44
Integration: attributes (documentation, issues)
First occurred: 09:41:31 (14 occurrences)
Last logged: 14:33:28

Unexpected exception importing platform custom_components.attributes.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 "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/attributes/sensor.py", line 44, in <module>
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'

Additional information

In previous HomeAssistant version, all worked fine

@pilotak
Copy link
Owner

pilotak commented Jun 8, 2023

@tefracky

In previous HomeAssistant version, all worked fine

As exected...

please try #37

@Conundrum1911
Copy link

Conundrum1911 commented Jun 8, 2023

@tefracky

In previous HomeAssistant version, all worked fine

As exected...

please try #37

I replaced my sensor.py with what was in #37 and it appears to be working again.

@V4n1X
Copy link

V4n1X commented Jun 8, 2023

@tefracky

In previous HomeAssistant version, all worked fine

As exected...
please try #37

I replaced my sensor.py with what was in #37 and it appears to be working again.

Can confirm it too, works with that again.

@tefracky
Copy link

tefracky commented Jun 8, 2023

With the fix, all works fine. I think you should merge it into master

@pilotak
Copy link
Owner

pilotak commented Jun 8, 2023

fixed in release v1.2.1

@pilotak pilotak closed this as completed Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants