home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.92k stars 30.14k forks source link

ZHA: definition of 'MULTI_MATCH' lost (used in custom quirks) #123707

Closed bullar closed 1 month ago

bullar commented 1 month ago

The problem

ImportError: cannot import name 'MULTI_MATCH' from 'homeassistant.components.zha.sensor' (/usr/src/homeassistant/homeassistant/components/zha/sensor.py)

What version of Home Assistant Core has the issue?

core-2024.8.1

What was the last working version of Home Assistant Core?

core-2024.7.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: zhaquirks
Source: /usr/local/lib/python3.12/site-packages/zhaquirks/__init__.py:461
First occurred: 4:47:52 PM (2 occurrences)
Last logged: 6:23:09 PM

Unexpected exception importing custom quirk 'dirb_waterlevel_3'
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/zhaquirks/__init__.py", line 459, in setup
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_zha_quirks/dirb_waterlevel_3.py", line 67, in <module>
    from homeassistant.components.zha.sensor import (MULTI_MATCH, Sensor)
ImportError: cannot import name 'MULTI_MATCH' from 'homeassistant.components.zha.sensor' (/usr/src/homeassistant/homeassistant/components/zha/sensor.py)

Additional information

No response

dmulcahey commented 1 month ago

We don’t accept issues for custom quirks. There were large changes to ZHA in this last release. Best to open an issue on the quirks repo and get the quirk merged so it’s supported