mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 14:17:45 +00:00
Add TI router transmit power config entity to ZHA (#81520)
Make TI Router Transmit Power configurable in ZHA
This commit is contained in:
parent
902e075d58
commit
523c3089f7
@ -161,6 +161,12 @@ class BasicChannel(ZigbeeChannel):
|
|||||||
self.ZCL_INIT_ATTRS.copy()
|
self.ZCL_INIT_ATTRS.copy()
|
||||||
)
|
)
|
||||||
self.ZCL_INIT_ATTRS["trigger_indicator"] = True
|
self.ZCL_INIT_ATTRS["trigger_indicator"] = True
|
||||||
|
elif (
|
||||||
|
self.cluster.endpoint.manufacturer == "TexasInstruments"
|
||||||
|
and self.cluster.endpoint.model == "ti.router"
|
||||||
|
):
|
||||||
|
self.ZCL_INIT_ATTRS = self.ZCL_INIT_ATTRS.copy()
|
||||||
|
self.ZCL_INIT_ATTRS["transmit_power"] = True
|
||||||
|
|
||||||
|
|
||||||
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.BinaryInput.cluster_id)
|
@registries.ZIGBEE_CHANNEL_REGISTRY.register(general.BinaryInput.cluster_id)
|
||||||
|
@ -19,6 +19,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||||||
from .core import discovery
|
from .core import discovery
|
||||||
from .core.const import (
|
from .core.const import (
|
||||||
CHANNEL_ANALOG_OUTPUT,
|
CHANNEL_ANALOG_OUTPUT,
|
||||||
|
CHANNEL_BASIC,
|
||||||
CHANNEL_COLOR,
|
CHANNEL_COLOR,
|
||||||
CHANNEL_INOVELLI,
|
CHANNEL_INOVELLI,
|
||||||
CHANNEL_LEVEL,
|
CHANNEL_LEVEL,
|
||||||
@ -585,6 +586,20 @@ class FilterLifeTime(ZHANumberConfigurationEntity, id_suffix="filter_life_time")
|
|||||||
_attr_name = "Filter life time"
|
_attr_name = "Filter life time"
|
||||||
|
|
||||||
|
|
||||||
|
@CONFIG_DIAGNOSTIC_MATCH(
|
||||||
|
channel_names=CHANNEL_BASIC,
|
||||||
|
manufacturers={"TexasInstruments"},
|
||||||
|
models={"ti.router"},
|
||||||
|
)
|
||||||
|
class TiRouterTransmitPower(ZHANumberConfigurationEntity, id_suffix="transmit_power"):
|
||||||
|
"""Representation of a ZHA TI transmit power configuration entity."""
|
||||||
|
|
||||||
|
_attr_native_min_value: float = -20
|
||||||
|
_attr_native_max_value: float = 20
|
||||||
|
_zcl_attribute: str = "transmit_power"
|
||||||
|
_attr_name = "Transmit power"
|
||||||
|
|
||||||
|
|
||||||
@CONFIG_DIAGNOSTIC_MATCH(channel_names=CHANNEL_INOVELLI)
|
@CONFIG_DIAGNOSTIC_MATCH(channel_names=CHANNEL_INOVELLI)
|
||||||
class InovelliRemoteDimmingUpSpeed(
|
class InovelliRemoteDimmingUpSpeed(
|
||||||
ZHANumberConfigurationEntity, id_suffix="dimming_speed_up_remote"
|
ZHANumberConfigurationEntity, id_suffix="dimming_speed_up_remote"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user