1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Bump ZHA to 0.0.88 (#161904)

This commit is contained in:
puddly
2026-01-30 05:18:38 -05:00
committed by GitHub
parent 862d0ea49e
commit 81f6136bda
7 changed files with 26 additions and 13 deletions

View File

@@ -23,7 +23,7 @@
"universal_silabs_flasher",
"serialx"
],
"requirements": ["zha==0.0.87", "serialx==0.6.2"],
"requirements": ["zha==0.0.88", "serialx==0.6.2"],
"usb": [
{
"description": "*2652*",

View File

@@ -53,6 +53,10 @@ import zigpy.backups
from zigpy.config import CONF_DEVICE
from zigpy.config.validators import cv_boolean
from zigpy.types.named import EUI64, KeyData
from zigpy.typing import (
UNDEFINED as ZIGPY_UNDEFINED,
UndefinedType as ZigpyUndefinedType,
)
from zigpy.zcl.clusters.security import IasAce
import zigpy.zdo.types as zdo_types
@@ -850,7 +854,7 @@ async def websocket_read_zigbee_cluster_attributes(
cluster_id: int = msg[ATTR_CLUSTER_ID]
cluster_type: str = msg[ATTR_CLUSTER_TYPE]
attribute: int = msg[ATTR_ATTRIBUTE]
manufacturer: int | None = msg.get(ATTR_MANUFACTURER)
manufacturer: int | ZigpyUndefinedType = msg.get(ATTR_MANUFACTURER, ZIGPY_UNDEFINED)
zha_device = zha_gateway.get_device(ieee)
success = {}
failure = {}
@@ -1326,7 +1330,9 @@ def async_load_api(hass: HomeAssistant) -> None:
cluster_type: str = service.data[ATTR_CLUSTER_TYPE]
attribute: int | str = service.data[ATTR_ATTRIBUTE]
value: int | bool | str = service.data[ATTR_VALUE]
manufacturer: int | None = service.data.get(ATTR_MANUFACTURER)
manufacturer: int | ZigpyUndefinedType = service.data.get(
ATTR_MANUFACTURER, ZIGPY_UNDEFINED
)
zha_device = zha_gateway.get_device(ieee)
response = None
if zha_device is not None:
@@ -1380,7 +1386,9 @@ def async_load_api(hass: HomeAssistant) -> None:
command_type: str = service.data[ATTR_COMMAND_TYPE]
args: list | None = service.data.get(ATTR_ARGS)
params: dict | None = service.data.get(ATTR_PARAMS)
manufacturer: int | None = service.data.get(ATTR_MANUFACTURER)
manufacturer: int | ZigpyUndefinedType = service.data.get(
ATTR_MANUFACTURER, ZIGPY_UNDEFINED
)
zha_device = zha_gateway.get_device(ieee)
if zha_device is not None:
if cluster_id >= MFG_CLUSTER_ID_START and manufacturer is None:
@@ -1435,7 +1443,9 @@ def async_load_api(hass: HomeAssistant) -> None:
cluster_id: int = service.data[ATTR_CLUSTER_ID]
command: int = service.data[ATTR_COMMAND]
args: list = service.data[ATTR_ARGS]
manufacturer: int | None = service.data.get(ATTR_MANUFACTURER)
manufacturer: int | ZigpyUndefinedType = service.data.get(
ATTR_MANUFACTURER, ZIGPY_UNDEFINED
)
group = zha_gateway.get_group(group_id)
if cluster_id >= MFG_CLUSTER_ID_START and manufacturer is None:
_LOGGER.error("Missing manufacturer attribute for cluster: %d", cluster_id)

2
requirements_all.txt generated
View File

@@ -3299,7 +3299,7 @@ zeroconf==0.148.0
zeversolar==0.3.2
# homeassistant.components.zha
zha==0.0.87
zha==0.0.88
# homeassistant.components.zhong_hong
zhong-hong-hvac==1.0.13

View File

@@ -2766,7 +2766,7 @@ zeroconf==0.148.0
zeversolar==0.3.2
# homeassistant.components.zha
zha==0.0.87
zha==0.0.88
# homeassistant.components.zwave_js
zwave-js-server-python==0.68.0

View File

@@ -7,6 +7,7 @@ import pytest
from zha.application.platforms.fan.const import PRESET_MODE_ON
from zigpy.device import Device
from zigpy.profiles import zha
from zigpy.typing import UNDEFINED
from zigpy.zcl.clusters import general, hvac
from homeassistant.components.fan import (
@@ -113,28 +114,28 @@ async def test_fan(
cluster.write_attributes.reset_mock()
await async_turn_on(hass, entity_id)
assert cluster.write_attributes.mock_calls == [
call({"fan_mode": 2}, manufacturer=None)
call({"fan_mode": 2}, manufacturer=UNDEFINED)
]
# turn off from HA
cluster.write_attributes.reset_mock()
await async_turn_off(hass, entity_id)
assert cluster.write_attributes.mock_calls == [
call({"fan_mode": 0}, manufacturer=None)
call({"fan_mode": 0}, manufacturer=UNDEFINED)
]
# change speed from HA
cluster.write_attributes.reset_mock()
await async_set_percentage(hass, entity_id, percentage=100)
assert cluster.write_attributes.mock_calls == [
call({"fan_mode": 3}, manufacturer=None)
call({"fan_mode": 3}, manufacturer=UNDEFINED)
]
# change preset_mode from HA
cluster.write_attributes.reset_mock()
await async_set_preset_mode(hass, entity_id, preset_mode=PRESET_MODE_ON)
assert cluster.write_attributes.mock_calls == [
call({"fan_mode": 4}, manufacturer=None)
call({"fan_mode": 4}, manufacturer=UNDEFINED)
]
# set invalid preset_mode from HA

View File

@@ -6,6 +6,7 @@ from unittest.mock import call, patch
import pytest
from zigpy.device import Device
from zigpy.profiles import zha
from zigpy.typing import UNDEFINED
from zigpy.zcl.clusters import general
import zigpy.zcl.foundation as zcl_f
@@ -122,7 +123,7 @@ async def test_number(
blocking=True,
)
assert cluster.write_attributes.mock_calls == [
call({"present_value": 30.0}, manufacturer=None)
call({"present_value": 30.0}, manufacturer=UNDEFINED)
]
cluster.PLUGGED_ATTR_READS["present_value"] = 30.0

View File

@@ -6,6 +6,7 @@ from unittest.mock import call, patch
import pytest
from zigpy.device import Device
from zigpy.profiles import zha
from zigpy.typing import UNDEFINED
from zigpy.zcl.clusters import general
import zigpy.zcl.foundation as zcl_f
@@ -143,5 +144,5 @@ async def test_switch(
)
assert len(cluster.read_attributes.mock_calls) == 1
assert cluster.read_attributes.call_args == call(
["on_off"], allow_cache=False, only_cache=False, manufacturer=None
["on_off"], allow_cache=False, only_cache=False, manufacturer=UNDEFINED
)