jeroenterheerdt / HADailySensor

Sensor for Home Assistant that gets reset at midnight
MIT License
76 stars 19 forks source link

No data HA2023.6 beta #39

Closed tomg1970 closed 1 year ago

tomg1970 commented 1 year ago

`Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.loader Source: custom_components/daily/sensor.py:49 Integration: Daily Sensor (documentation, issues) First occurred: 08:51:06 (5 occurrences) Last logged: 08:51:06

Unexpected exception importing platform custom_components.daily.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/daily/sensor.py", line 40, in class DailySensor(DailySensorEntity): File "/config/custom_components/daily/sensor.py", line 49, in DailySensor @asyncio.coroutine ^^^^^^^^^^^^^^^^^ AttributeError: module 'asyncio' has no attribute 'coroutine' `

Kaibob2 commented 1 year ago

@jeroenterheerdt Can you please give a response if this issue is going to be fixed soon or if you've given up on that integration as the last merge is one year ago. Thanks.

Kaibob2 commented 1 year ago
Logger: homeassistant.loader
Source: custom_components/daily/sensor.py:49
Integration: Daily Sensor ([documentation](https://github.com/jeroenterheerdt/HADailySensor), [issues](https://github.com/jeroenterheerdt/HADailySensor/issues))
First occurred: 23:04:12 (5 occurrences)
Last logged: 23:04:12
Unexpected exception importing platform custom_components.daily.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/daily/sensor.py", line 40, in <module>
    class DailySensor(DailySensorEntity):
  File "/config/custom_components/daily/sensor.py", line 49, in DailySensor
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'
 Logger: homeassistant.setup
Source: setup.py:374
First occurred: 23:04:12 (5 occurrences)
Last logged: 23:04:12
Unable to prepare setup for platform daily.sensor: Platform not found (Exception importing custom_components.daily.sensor).
olealm commented 1 year ago

Same issue.

XtremeLead commented 1 year ago

Same here after updating to Home Assistant Core 2023.6.0.

edit: Just checked...https://github.com/jeroenterheerdt/HADailySensor/pull/36 fixes this issue.

nukleuz80 commented 1 year ago

@XtremeLead

THX - just uncomment/delete: @asyncio.coroutine in sensor.py line 49.

marcel-sch commented 1 year ago

edit: Just checked...#36 fixes this issue.

it works for me too, thanks for the PR @bbr111

kwithus commented 1 year ago

@XtremeLead

THX - just uncomment/delete: @asyncio.coroutine in sensor.py line 49.

Yes, works for me too, thanks Still, hopefully we will see an update soon

sidwin9 commented 1 year ago

Hey, Same problem with HAS 2023.6.0

kwithus commented 1 year ago

Hey, Same problem with HAS 2023.6.0

As written bevor, you can edit the integration and solve it

go to /config/custom_components/daily/sensor.py

and delete the line 49

Then restart HA, Everything works

Kaibob2 commented 1 year ago

Uncommenting line 49 in sensor.py works. Issue fixed, thanks.

vantop77 commented 1 year ago

Commenting line 49 (which means disabling code on that line, not uncommenting) fixes the problem also at my side.

Kaibob2 commented 1 year ago

Sorry, my fault, this is a german / english mixup. Commenting is what I meant. In german it's "auskommentieren" and this would freely translate to "uncomment" but in fact it's the opposite. Anyway, commenting fixes the issue :)