Bump zwave-js-server-python to 0.28.0 (#53302)
This commit is contained in:
parent
1bde914075
commit
b9a6ce77d1
10 changed files with 45 additions and 33 deletions
|
@ -70,7 +70,3 @@ ATTR_BROADCAST = "broadcast"
|
||||||
SERVICE_PING = "ping"
|
SERVICE_PING = "ping"
|
||||||
|
|
||||||
ADDON_SLUG = "core_zwave_js"
|
ADDON_SLUG = "core_zwave_js"
|
||||||
|
|
||||||
# Siren constants
|
|
||||||
TONE_ID_DEFAULT = 255
|
|
||||||
TONE_ID_OFF = 0
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from zwave_js_server.client import Client as ZwaveClient
|
from zwave_js_server.client import Client as ZwaveClient
|
||||||
from zwave_js_server.model.node import NodeStatus
|
from zwave_js_server.const import NodeStatus
|
||||||
from zwave_js_server.model.value import Value as ZwaveValue, get_value_id
|
from zwave_js_server.model.value import Value as ZwaveValue, get_value_id
|
||||||
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
|
@ -213,13 +213,13 @@ class ZWaveBaseEntity(Entity):
|
||||||
# If we haven't found a value and check_all_endpoints is True, we should
|
# If we haven't found a value and check_all_endpoints is True, we should
|
||||||
# return the first value we can find on any other endpoint
|
# return the first value we can find on any other endpoint
|
||||||
if return_value is None and check_all_endpoints:
|
if return_value is None and check_all_endpoints:
|
||||||
for endpoint_ in self.info.node.endpoints:
|
for endpoint_idx in self.info.node.endpoints:
|
||||||
if endpoint_.index != self.info.primary_value.endpoint:
|
if endpoint_idx != self.info.primary_value.endpoint:
|
||||||
value_id = get_value_id(
|
value_id = get_value_id(
|
||||||
self.info.node,
|
self.info.node,
|
||||||
command_class,
|
command_class,
|
||||||
value_property,
|
value_property,
|
||||||
endpoint=endpoint_.index,
|
endpoint=endpoint_idx,
|
||||||
property_key=value_property_key,
|
property_key=value_property_key,
|
||||||
)
|
)
|
||||||
return_value = self.info.node.values.get(value_id)
|
return_value = self.info.node.values.get(value_id)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Z-Wave JS",
|
"name": "Z-Wave JS",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/zwave_js",
|
"documentation": "https://www.home-assistant.io/integrations/zwave_js",
|
||||||
"requirements": ["zwave-js-server-python==0.27.1"],
|
"requirements": ["zwave-js-server-python==0.28.0"],
|
||||||
"codeowners": ["@home-assistant/z-wave"],
|
"codeowners": ["@home-assistant/z-wave"],
|
||||||
"dependencies": ["http", "websocket_api"],
|
"dependencies": ["http", "websocket_api"],
|
||||||
"iot_class": "local_push"
|
"iot_class": "local_push"
|
||||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import annotations
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from zwave_js_server.client import Client as ZwaveClient
|
from zwave_js_server.client import Client as ZwaveClient
|
||||||
|
from zwave_js_server.const import ToneID
|
||||||
|
|
||||||
from homeassistant.components.siren import DOMAIN as SIREN_DOMAIN, SirenEntity
|
from homeassistant.components.siren import DOMAIN as SIREN_DOMAIN, SirenEntity
|
||||||
from homeassistant.components.siren.const import (
|
from homeassistant.components.siren.const import (
|
||||||
|
@ -19,7 +20,7 @@ from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import DATA_CLIENT, DOMAIN, TONE_ID_DEFAULT, TONE_ID_OFF
|
from .const import DATA_CLIENT, DOMAIN
|
||||||
from .discovery import ZwaveDiscoveryInfo
|
from .discovery import ZwaveDiscoveryInfo
|
||||||
from .entity import ZWaveBaseEntity
|
from .entity import ZWaveBaseEntity
|
||||||
|
|
||||||
|
@ -87,7 +88,7 @@ class ZwaveSirenEntity(ZWaveBaseEntity, SirenEntity):
|
||||||
options["volume"] = round(volume * 100)
|
options["volume"] = round(volume * 100)
|
||||||
# Play the default tone if a tone isn't provided
|
# Play the default tone if a tone isn't provided
|
||||||
if tone is None:
|
if tone is None:
|
||||||
await self.async_set_value(TONE_ID_DEFAULT, options)
|
await self.async_set_value(ToneID.DEFAULT, options)
|
||||||
return
|
return
|
||||||
|
|
||||||
tone_id = int(
|
tone_id = int(
|
||||||
|
@ -102,4 +103,4 @@ class ZwaveSirenEntity(ZWaveBaseEntity, SirenEntity):
|
||||||
|
|
||||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||||
"""Turn the device off."""
|
"""Turn the device off."""
|
||||||
await self.async_set_value(TONE_ID_OFF)
|
await self.async_set_value(ToneID.OFF)
|
||||||
|
|
|
@ -2461,4 +2461,4 @@ zigpy==0.35.2
|
||||||
zm-py==0.5.2
|
zm-py==0.5.2
|
||||||
|
|
||||||
# homeassistant.components.zwave_js
|
# homeassistant.components.zwave_js
|
||||||
zwave-js-server-python==0.27.1
|
zwave-js-server-python==0.28.0
|
||||||
|
|
|
@ -1355,4 +1355,4 @@ zigpy-znp==0.5.1
|
||||||
zigpy==0.35.2
|
zigpy==0.35.2
|
||||||
|
|
||||||
# homeassistant.components.zwave_js
|
# homeassistant.components.zwave_js
|
||||||
zwave-js-server-python==0.27.1
|
zwave-js-server-python==0.28.0
|
||||||
|
|
|
@ -35,6 +35,7 @@ from .common import (
|
||||||
AEON_SMART_SWITCH_LIGHT_ENTITY,
|
AEON_SMART_SWITCH_LIGHT_ENTITY,
|
||||||
AIR_TEMPERATURE_SENSOR,
|
AIR_TEMPERATURE_SENSOR,
|
||||||
CLIMATE_DANFOSS_LC13_ENTITY,
|
CLIMATE_DANFOSS_LC13_ENTITY,
|
||||||
|
CLIMATE_EUROTRONICS_SPIRIT_Z_ENTITY,
|
||||||
CLIMATE_RADIO_THERMOSTAT_ENTITY,
|
CLIMATE_RADIO_THERMOSTAT_ENTITY,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -805,7 +806,7 @@ async def test_multicast_set_value(
|
||||||
hass,
|
hass,
|
||||||
client,
|
client,
|
||||||
climate_danfoss_lc_13,
|
climate_danfoss_lc_13,
|
||||||
climate_radio_thermostat_ct100_plus_different_endpoints,
|
climate_eurotronic_spirit_z,
|
||||||
integration,
|
integration,
|
||||||
):
|
):
|
||||||
"""Test multicast_set_value service."""
|
"""Test multicast_set_value service."""
|
||||||
|
@ -816,7 +817,7 @@ async def test_multicast_set_value(
|
||||||
{
|
{
|
||||||
ATTR_ENTITY_ID: [
|
ATTR_ENTITY_ID: [
|
||||||
CLIMATE_DANFOSS_LC13_ENTITY,
|
CLIMATE_DANFOSS_LC13_ENTITY,
|
||||||
CLIMATE_RADIO_THERMOSTAT_ENTITY,
|
CLIMATE_EUROTRONICS_SPIRIT_Z_ENTITY,
|
||||||
],
|
],
|
||||||
ATTR_COMMAND_CLASS: 117,
|
ATTR_COMMAND_CLASS: 117,
|
||||||
ATTR_PROPERTY: "local",
|
ATTR_PROPERTY: "local",
|
||||||
|
@ -829,7 +830,7 @@ async def test_multicast_set_value(
|
||||||
args = client.async_send_command.call_args[0][0]
|
args = client.async_send_command.call_args[0][0]
|
||||||
assert args["command"] == "multicast_group.set_value"
|
assert args["command"] == "multicast_group.set_value"
|
||||||
assert args["nodeIDs"] == [
|
assert args["nodeIDs"] == [
|
||||||
climate_radio_thermostat_ct100_plus_different_endpoints.node_id,
|
climate_eurotronic_spirit_z.node_id,
|
||||||
climate_danfoss_lc_13.node_id,
|
climate_danfoss_lc_13.node_id,
|
||||||
]
|
]
|
||||||
assert args["valueId"] == {
|
assert args["valueId"] == {
|
||||||
|
@ -847,7 +848,7 @@ async def test_multicast_set_value(
|
||||||
{
|
{
|
||||||
ATTR_ENTITY_ID: [
|
ATTR_ENTITY_ID: [
|
||||||
CLIMATE_DANFOSS_LC13_ENTITY,
|
CLIMATE_DANFOSS_LC13_ENTITY,
|
||||||
CLIMATE_RADIO_THERMOSTAT_ENTITY,
|
CLIMATE_EUROTRONICS_SPIRIT_Z_ENTITY,
|
||||||
],
|
],
|
||||||
ATTR_COMMAND_CLASS: 117,
|
ATTR_COMMAND_CLASS: 117,
|
||||||
ATTR_PROPERTY: "local",
|
ATTR_PROPERTY: "local",
|
||||||
|
@ -860,7 +861,7 @@ async def test_multicast_set_value(
|
||||||
args = client.async_send_command.call_args[0][0]
|
args = client.async_send_command.call_args[0][0]
|
||||||
assert args["command"] == "multicast_group.set_value"
|
assert args["command"] == "multicast_group.set_value"
|
||||||
assert args["nodeIDs"] == [
|
assert args["nodeIDs"] == [
|
||||||
climate_radio_thermostat_ct100_plus_different_endpoints.node_id,
|
climate_eurotronic_spirit_z.node_id,
|
||||||
climate_danfoss_lc_13.node_id,
|
climate_danfoss_lc_13.node_id,
|
||||||
]
|
]
|
||||||
assert args["valueId"] == {
|
assert args["valueId"] == {
|
||||||
|
@ -937,7 +938,7 @@ async def test_multicast_set_value(
|
||||||
{
|
{
|
||||||
ATTR_ENTITY_ID: [
|
ATTR_ENTITY_ID: [
|
||||||
CLIMATE_DANFOSS_LC13_ENTITY,
|
CLIMATE_DANFOSS_LC13_ENTITY,
|
||||||
CLIMATE_RADIO_THERMOSTAT_ENTITY,
|
CLIMATE_EUROTRONICS_SPIRIT_Z_ENTITY,
|
||||||
],
|
],
|
||||||
ATTR_COMMAND_CLASS: 117,
|
ATTR_COMMAND_CLASS: 117,
|
||||||
ATTR_PROPERTY: "local",
|
ATTR_PROPERTY: "local",
|
||||||
|
|
|
@ -53,6 +53,7 @@ TONE_ID_VALUE_ID = {
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default",
|
"255": "default",
|
||||||
},
|
},
|
||||||
|
"valueChangeOptions": ["volume"],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2597,7 +2597,8 @@
|
||||||
"writeable": true,
|
"writeable": true,
|
||||||
"label": "Tone ID",
|
"label": "Tone ID",
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 255
|
"max": 255,
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2726,7 +2727,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2856,7 +2858,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3011,7 +3014,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3166,7 +3170,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3321,7 +3326,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3451,7 +3457,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -3581,7 +3588,8 @@
|
||||||
"29": "29UPWA~1 (2 sec)",
|
"29": "29UPWA~1 (2 sec)",
|
||||||
"30": "30DOOR~1 (27 sec)",
|
"30": "30DOOR~1 (27 sec)",
|
||||||
"255": "default"
|
"255": "default"
|
||||||
}
|
},
|
||||||
|
"valueChangeOptions": ["volume"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -267,7 +267,8 @@
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 255,
|
"max": 255,
|
||||||
"label": "Target value (Warm White)",
|
"label": "Target value (Warm White)",
|
||||||
"description": "The target value of the Warm White color."
|
"description": "The target value of the Warm White color.",
|
||||||
|
"valueChangeOptions": ["transitionDuration"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -285,7 +286,8 @@
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 255,
|
"max": 255,
|
||||||
"label": "Target value (Cold White)",
|
"label": "Target value (Cold White)",
|
||||||
"description": "The target value of the Cold White color."
|
"description": "The target value of the Cold White color.",
|
||||||
|
"valueChangeOptions": ["transitionDuration"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -303,7 +305,8 @@
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 255,
|
"max": 255,
|
||||||
"label": "Target value (Red)",
|
"label": "Target value (Red)",
|
||||||
"description": "The target value of the Red color."
|
"description": "The target value of the Red color.",
|
||||||
|
"valueChangeOptions": ["transitionDuration"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -321,7 +324,8 @@
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 255,
|
"max": 255,
|
||||||
"label": "Target value (Green)",
|
"label": "Target value (Green)",
|
||||||
"description": "The target value of the Green color."
|
"description": "The target value of the Green color.",
|
||||||
|
"valueChangeOptions": ["transitionDuration"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -339,7 +343,8 @@
|
||||||
"min": 0,
|
"min": 0,
|
||||||
"max": 255,
|
"max": 255,
|
||||||
"label": "Target value (Blue)",
|
"label": "Target value (Blue)",
|
||||||
"description": "The target value of the Blue color."
|
"description": "The target value of the Blue color.",
|
||||||
|
"valueChangeOptions": ["transitionDuration"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue