lichtteil / local_luftdaten

Custom component for Home Assistant that integrates your (own) local Luftdaten sensor (air quality/particle sensor) without using the cloud.
MIT License
46 stars 19 forks source link

HA 2023.6.0 luftdaten.local failed #57

Closed lebherz closed 1 year ago

lebherz commented 1 year ago

System:

 Home Assistant 2023.6.0
 Supervisor 2023.06.1
 Operating System 10.2
 Frontend 20230607.0 - latest

My config in HA configuration.yaml

sensor: 
  - platform: local_luftdaten
    host: 192.168.178.56
    scan_interval: 180
    name: Feinstaubsensor
    monitored_conditions:
      - SDS_P1
      - SDS_P2
      - BME280_temperature
      - BME280_humidity
      - BME280_pressure

Error-Message:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.loader
Source: custom_components/local_luftdaten/sensor.py:61
Integration: local_luftdaten (documentation, issues)
First occurred: 23:54:14 (1 occurrences)
Last logged: 23:54:14

Unexpected exception importing platform custom_components.local_luftdaten.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/local_luftdaten/sensor.py", line 61, in <module>
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'
LuckyTriple7 commented 1 year ago

replace the attached sensor.py in the ZIP File, located in _config/custom_components/localluftdaten and restart HA. sensor.zip

xHuubx commented 1 year ago

replace the attached sensor.py in the ZIP File, located in _config/custom_components/localluftdaten and restart HA. sensor.zip

Great! That fixed the issue for me :)

lebherz commented 1 year ago

Thx @LuckyTriple7 fixed for me/us. Will where come a new official version? @lichtteil ?