mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Fix Samjin Multi acceleration in ZHA (#69636)
This commit is contained in:
parent
2ae3372128
commit
261e12e881
@ -8,7 +8,12 @@ import logging
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import zigpy.exceptions
|
import zigpy.exceptions
|
||||||
from zigpy.zcl.foundation import CommandSchema, ConfigureReportingResponseRecord, Status
|
from zigpy.zcl.foundation import (
|
||||||
|
CommandSchema,
|
||||||
|
ConfigureReportingResponseRecord,
|
||||||
|
Status,
|
||||||
|
ZCLAttributeDef,
|
||||||
|
)
|
||||||
|
|
||||||
from homeassistant.const import ATTR_COMMAND
|
from homeassistant.const import ATTR_COMMAND
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
@ -112,7 +117,11 @@ class ZigbeeChannel(LogMixin):
|
|||||||
if not hasattr(self, "_value_attribute") and self.REPORT_CONFIG:
|
if not hasattr(self, "_value_attribute") and self.REPORT_CONFIG:
|
||||||
attr = self.REPORT_CONFIG[0].get("attr")
|
attr = self.REPORT_CONFIG[0].get("attr")
|
||||||
if isinstance(attr, str):
|
if isinstance(attr, str):
|
||||||
self.value_attribute = self.cluster.attributes_by_name.get(attr)
|
attribute: ZCLAttributeDef = self.cluster.attributes_by_name.get(attr)
|
||||||
|
if attribute is not None:
|
||||||
|
self.value_attribute = attribute.id
|
||||||
|
else:
|
||||||
|
self.value_attribute = None
|
||||||
else:
|
else:
|
||||||
self.value_attribute = attr
|
self.value_attribute = attr
|
||||||
self._status = ChannelStatus.CREATED
|
self._status = ChannelStatus.CREATED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user