mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Bump zwave-js-server-python to 0.35.0 (#66785)
* Bump zwave-js-server-python to 0.35.0 * Remove support for new event type which should go in a separate PR
This commit is contained in:
parent
703d01e772
commit
82ebb7047f
@ -8,8 +8,8 @@ from zwave_js_server.model.node import NodeDataType
|
|||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_URL
|
from homeassistant.const import CONF_URL
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers import device_registry as dr
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
from homeassistant.helpers.device_registry import DeviceEntry
|
|
||||||
|
|
||||||
from .const import DATA_CLIENT, DOMAIN
|
from .const import DATA_CLIENT, DOMAIN
|
||||||
from .helpers import get_home_and_node_id_from_device_entry
|
from .helpers import get_home_and_node_id_from_device_entry
|
||||||
@ -26,7 +26,7 @@ async def async_get_config_entry_diagnostics(
|
|||||||
|
|
||||||
|
|
||||||
async def async_get_device_diagnostics(
|
async def async_get_device_diagnostics(
|
||||||
hass: HomeAssistant, config_entry: ConfigEntry, device: DeviceEntry
|
hass: HomeAssistant, config_entry: ConfigEntry, device: dr.DeviceEntry
|
||||||
) -> NodeDataType:
|
) -> NodeDataType:
|
||||||
"""Return diagnostics for a device."""
|
"""Return diagnostics for a device."""
|
||||||
client: Client = hass.data[DOMAIN][config_entry.entry_id][DATA_CLIENT]
|
client: Client = hass.data[DOMAIN][config_entry.entry_id][DATA_CLIENT]
|
||||||
@ -42,8 +42,5 @@ async def async_get_device_diagnostics(
|
|||||||
"minSchemaVersion": client.version.min_schema_version,
|
"minSchemaVersion": client.version.min_schema_version,
|
||||||
"maxSchemaVersion": client.version.max_schema_version,
|
"maxSchemaVersion": client.version.max_schema_version,
|
||||||
},
|
},
|
||||||
"state": {
|
"state": node.data,
|
||||||
**node.data,
|
|
||||||
"values": [value.data for value in node.values.values()],
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
@ -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.34.0"],
|
"requirements": ["zwave-js-server-python==0.35.0"],
|
||||||
"codeowners": ["@home-assistant/z-wave"],
|
"codeowners": ["@home-assistant/z-wave"],
|
||||||
"dependencies": ["usb", "http", "websocket_api"],
|
"dependencies": ["usb", "http", "websocket_api"],
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
|
@ -2559,7 +2559,7 @@ zigpy==0.43.0
|
|||||||
zm-py==0.5.2
|
zm-py==0.5.2
|
||||||
|
|
||||||
# homeassistant.components.zwave_js
|
# homeassistant.components.zwave_js
|
||||||
zwave-js-server-python==0.34.0
|
zwave-js-server-python==0.35.0
|
||||||
|
|
||||||
# homeassistant.components.zwave_me
|
# homeassistant.components.zwave_me
|
||||||
zwave_me_ws==0.1.23
|
zwave_me_ws==0.1.23
|
||||||
|
@ -1584,7 +1584,7 @@ zigpy-znp==0.7.0
|
|||||||
zigpy==0.43.0
|
zigpy==0.43.0
|
||||||
|
|
||||||
# homeassistant.components.zwave_js
|
# homeassistant.components.zwave_js
|
||||||
zwave-js-server-python==0.34.0
|
zwave-js-server-python==0.35.0
|
||||||
|
|
||||||
# homeassistant.components.zwave_me
|
# homeassistant.components.zwave_me
|
||||||
zwave_me_ws==0.1.23
|
zwave_me_ws==0.1.23
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 16, "label":"Binary Switch"},
|
"generic": {"key": 16, "label":"Binary Switch"},
|
||||||
"specific": {"key": 1, "label":"Binary Power Switch"},
|
"specific": {"key": 1, "label":"Binary Power Switch"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
@ -50,10 +50,10 @@
|
|||||||
"nodeId": 102,
|
"nodeId": 102,
|
||||||
"index": 0,
|
"index": 0,
|
||||||
"installerIcon": 1792,
|
"installerIcon": 1792,
|
||||||
"userIcon": 1792
|
"userIcon": 1792,
|
||||||
|
"commandClasses": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"commandClasses": [],
|
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{
|
||||||
"endpoint": 0,
|
"endpoint": 0,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 8, "label":"Thermostat"},
|
"generic": {"key": 8, "label":"Thermostat"},
|
||||||
"specific": {"key": 6, "label":"Thermostat General V2"},
|
"specific": {"key": 6, "label":"Thermostat General V2"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 17, "label":"Multilevel Switch"},
|
"generic": {"key": 17, "label":"Multilevel Switch"},
|
||||||
"specific": {"key": 1, "label":"Multilevel Power Switch"},
|
"specific": {"key": 1, "label":"Multilevel Power Switch"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 17, "label":"Multilevel Switch"},
|
"generic": {"key": 17, "label":"Multilevel Switch"},
|
||||||
"specific": {"key": 7, "label":"Motor Control Class C"},
|
"specific": {"key": 7, "label":"Motor Control Class C"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"Thermostat Setpoint",
|
"Thermostat Setpoint",
|
||||||
"Version"
|
"Version"
|
||||||
],
|
],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 8, "label":"Thermostat"},
|
"generic": {"key": 8, "label":"Thermostat"},
|
||||||
"specific": {"key": 6, "label":"Thermostat General V2"},
|
"specific": {"key": 6, "label":"Thermostat General V2"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
"status": 4,
|
"status": 4,
|
||||||
"ready": true,
|
"ready": true,
|
||||||
"deviceClass": {
|
"deviceClass": {
|
||||||
"basic": {"key": 2, "label":"Static Controller"},
|
"basic": { "key": 2, "label": "Static Controller" },
|
||||||
"generic": {"key": 8, "label":"Thermostat"},
|
"generic": { "key": 8, "label": "Thermostat" },
|
||||||
"specific": {"key": 6, "label":"Thermostat General V2"},
|
"specific": { "key": 6, "label": "Thermostat General V2" },
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
@ -47,16 +47,7 @@
|
|||||||
"nodeId": 13,
|
"nodeId": 13,
|
||||||
"index": 0,
|
"index": 0,
|
||||||
"installerIcon": 4608,
|
"installerIcon": 4608,
|
||||||
"userIcon": 4608
|
"userIcon": 4608,
|
||||||
},
|
|
||||||
{
|
|
||||||
"nodeId": 13,
|
|
||||||
"index": 1,
|
|
||||||
"installerIcon": 4608,
|
|
||||||
"userIcon": 4608
|
|
||||||
},
|
|
||||||
{ "nodeId": 13, "index": 2 }
|
|
||||||
],
|
|
||||||
"commandClasses": [
|
"commandClasses": [
|
||||||
{
|
{
|
||||||
"id": 49,
|
"id": 49,
|
||||||
@ -178,6 +169,15 @@
|
|||||||
"version": 3,
|
"version": 3,
|
||||||
"isSecure": false
|
"isSecure": false
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nodeId": 13,
|
||||||
|
"index": 1,
|
||||||
|
"installerIcon": 4608,
|
||||||
|
"userIcon": 4608
|
||||||
|
},
|
||||||
|
{ "nodeId": 13, "index": 2 }
|
||||||
],
|
],
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 17, "label":"Routing Slave"},
|
"generic": {"key": 17, "label":"Routing Slave"},
|
||||||
"specific": {"key": 0, "label":"Unused"},
|
"specific": {"key": 0, "label":"Unused"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 64, "label":"Entry Control"},
|
"generic": {"key": 64, "label":"Entry Control"},
|
||||||
"specific": {"key": 7, "label":"Secure Barrier Add-on"},
|
"specific": {"key": 7, "label":"Secure Barrier Add-on"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 17, "label":"Routing Slave"},
|
"generic": {"key": 17, "label":"Routing Slave"},
|
||||||
"specific": {"key": 1, "label":"Multilevel Power Switch"},
|
"specific": {"key": 1, "label":"Multilevel Power Switch"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"generic": {"key": 32, "label":"Binary Sensor"},
|
"generic": {"key": 32, "label":"Binary Sensor"},
|
||||||
"specific": {"key": 1, "label":"Routing Binary Sensor"},
|
"specific": {"key": 1, "label":"Routing Binary Sensor"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"generic": {"key": 17, "label":"Multilevel Switch"},
|
"generic": {"key": 17, "label":"Multilevel Switch"},
|
||||||
"specific": {"key": 1, "label":"Multilevel Power Switch"},
|
"specific": {"key": 1, "label":"Multilevel Power Switch"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 17, "label":"Multilevel Switch"},
|
"generic": {"key": 17, "label":"Multilevel Switch"},
|
||||||
"specific": {"key": 8, "label":"Fan Switch"},
|
"specific": {"key": 8, "label":"Fan Switch"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -64,7 +64,87 @@
|
|||||||
},
|
},
|
||||||
"mandatorySupportedCCs": [32, 38, 39],
|
"mandatorySupportedCCs": [32, 38, 39],
|
||||||
"mandatoryControlledCCs": []
|
"mandatoryControlledCCs": []
|
||||||
|
},
|
||||||
|
"commandClasses": [
|
||||||
|
{
|
||||||
|
"id": 32,
|
||||||
|
"name": "Basic",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 38,
|
||||||
|
"name": "Multilevel Switch",
|
||||||
|
"version": 2,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 43,
|
||||||
|
"name": "Scene Activation",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 44,
|
||||||
|
"name": "Scene Actuator Configuration",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 86,
|
||||||
|
"name": "CRC-16 Encapsulation",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 89,
|
||||||
|
"name": "Association Group Information",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 90,
|
||||||
|
"name": "Device Reset Locally",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 94,
|
||||||
|
"name": "Z-Wave Plus Info",
|
||||||
|
"version": 2,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 112,
|
||||||
|
"name": "Configuration",
|
||||||
|
"version": 1,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 114,
|
||||||
|
"name": "Manufacturer Specific",
|
||||||
|
"version": 2,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 122,
|
||||||
|
"name": "Firmware Update Meta Data",
|
||||||
|
"version": 2,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 133,
|
||||||
|
"name": "Association",
|
||||||
|
"version": 2,
|
||||||
|
"isSecure": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 134,
|
||||||
|
"name": "Version",
|
||||||
|
"version": 2,
|
||||||
|
"isSecure": false
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"values": [
|
"values": [
|
||||||
@ -557,86 +637,6 @@
|
|||||||
"mandatorySupportedCCs": [32, 38, 39],
|
"mandatorySupportedCCs": [32, 38, 39],
|
||||||
"mandatoryControlledCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"commandClasses": [
|
|
||||||
{
|
|
||||||
"id": 32,
|
|
||||||
"name": "Basic",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 38,
|
|
||||||
"name": "Multilevel Switch",
|
|
||||||
"version": 2,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 43,
|
|
||||||
"name": "Scene Activation",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 44,
|
|
||||||
"name": "Scene Actuator Configuration",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 86,
|
|
||||||
"name": "CRC-16 Encapsulation",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 89,
|
|
||||||
"name": "Association Group Information",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 90,
|
|
||||||
"name": "Device Reset Locally",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 94,
|
|
||||||
"name": "Z-Wave Plus Info",
|
|
||||||
"version": 2,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 112,
|
|
||||||
"name": "Configuration",
|
|
||||||
"version": 1,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 114,
|
|
||||||
"name": "Manufacturer Specific",
|
|
||||||
"version": 2,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 122,
|
|
||||||
"name": "Firmware Update Meta Data",
|
|
||||||
"version": 2,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 133,
|
|
||||||
"name": "Association",
|
|
||||||
"version": 2,
|
|
||||||
"isSecure": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 134,
|
|
||||||
"name": "Version",
|
|
||||||
"version": 2,
|
|
||||||
"isSecure": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"interviewStage": "Complete",
|
"interviewStage": "Complete",
|
||||||
"deviceDatabaseUrl": "https://devices.zwave-js.io/?jumpTo=0x0063:0x4944:0x3038:5.26"
|
"deviceDatabaseUrl": "https://devices.zwave-js.io/?jumpTo=0x0063:0x4944:0x3038:5.26"
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 16, "label":"Binary Switch"},
|
"generic": {"key": 16, "label":"Binary Switch"},
|
||||||
"specific": {"key": 1, "label":"Binary Power Switch"},
|
"specific": {"key": 1, "label":"Binary Power Switch"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
@ -60,10 +60,10 @@
|
|||||||
"nodeId": 32,
|
"nodeId": 32,
|
||||||
"index": 0,
|
"index": 0,
|
||||||
"installerIcon": 1792,
|
"installerIcon": 1792,
|
||||||
"userIcon": 1792
|
"userIcon": 1792,
|
||||||
|
"commandClasses": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"commandClasses": [],
|
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{
|
||||||
"commandClassName": "Binary Switch",
|
"commandClassName": "Binary Switch",
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 64, "label":"Entry Control"},
|
"generic": {"key": 64, "label":"Entry Control"},
|
||||||
"specific": {"key": 3, "label":"Secure Keypad Door Lock"},
|
"specific": {"key": 3, "label":"Secure Keypad Door Lock"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"generic": {"key": 64, "label":"Entry Control"},
|
"generic": {"key": 64, "label":"Entry Control"},
|
||||||
"specific": {"key": 3, "label":"Secure Keypad Door Lock"},
|
"specific": {"key": 3, "label":"Secure Keypad Door Lock"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
@ -47,9 +47,7 @@
|
|||||||
"endpoints": [
|
"endpoints": [
|
||||||
{
|
{
|
||||||
"nodeId": 20,
|
"nodeId": 20,
|
||||||
"index": 0
|
"index": 0,
|
||||||
}
|
|
||||||
],
|
|
||||||
"commandClasses": [
|
"commandClasses": [
|
||||||
{
|
{
|
||||||
"id": 98,
|
"id": 98,
|
||||||
@ -111,6 +109,8 @@
|
|||||||
"version": 1,
|
"version": 1,
|
||||||
"isSecure": true
|
"isSecure": true
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"values": [
|
"values": [
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 21, "label":"Multilevel Sensor"},
|
"generic": {"key": 21, "label":"Multilevel Sensor"},
|
||||||
"specific": {"key": 1, "label":"Routing Multilevel Sensor"},
|
"specific": {"key": 1, "label":"Routing Multilevel Sensor"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": true,
|
"isListening": true,
|
||||||
"isFrequentListening": false,
|
"isFrequentListening": false,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"generic": {"key": 8, "label":"Thermostat"},
|
"generic": {"key": 8, "label":"Thermostat"},
|
||||||
"specific": {"key": 6, "label":"Thermostat General V2"},
|
"specific": {"key": 6, "label":"Thermostat General V2"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"neighbors": [],
|
"neighbors": [],
|
||||||
"interviewAttempts": 1,
|
"interviewAttempts": 1,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
"generic": {"key": 8, "label":"Thermostat"},
|
"generic": {"key": 8, "label":"Thermostat"},
|
||||||
"specific": {"key": 6, "label":"Thermostat General V2"},
|
"specific": {"key": 6, "label":"Thermostat General V2"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
@ -274,5 +274,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"replaced": false
|
||||||
}
|
}
|
@ -10,7 +10,7 @@
|
|||||||
"generic": {"key": 8, "label":"Thermostat"},
|
"generic": {"key": 8, "label":"Thermostat"},
|
||||||
"specific": {"key": 6, "label":"Thermostat General V2"},
|
"specific": {"key": 6, "label":"Thermostat General V2"},
|
||||||
"mandatorySupportedCCs": [],
|
"mandatorySupportedCCs": [],
|
||||||
"mandatoryControlCCs": []
|
"mandatoryControlledCCs": []
|
||||||
},
|
},
|
||||||
"isListening": false,
|
"isListening": false,
|
||||||
"isFrequentListening": true,
|
"isFrequentListening": true,
|
||||||
|
@ -80,6 +80,12 @@
|
|||||||
"aggregatedEndpointCount": 0,
|
"aggregatedEndpointCount": 0,
|
||||||
"interviewAttempts": 1,
|
"interviewAttempts": 1,
|
||||||
"interviewStage": "NodeInfo",
|
"interviewStage": "NodeInfo",
|
||||||
|
"endpoints": [
|
||||||
|
{
|
||||||
|
"nodeId": 35,
|
||||||
|
"index": 0,
|
||||||
|
"installerIcon": 7172,
|
||||||
|
"userIcon": 7172,
|
||||||
"commandClasses": [
|
"commandClasses": [
|
||||||
{
|
{
|
||||||
"id": 89,
|
"id": 89,
|
||||||
@ -165,13 +171,7 @@
|
|||||||
"version": 3,
|
"version": 3,
|
||||||
"isSecure": false
|
"isSecure": false
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"endpoints": [
|
|
||||||
{
|
|
||||||
"nodeId": 35,
|
|
||||||
"index": 0,
|
|
||||||
"installerIcon": 7172,
|
|
||||||
"userIcon": 7172
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nodeId": 35,
|
"nodeId": 35,
|
||||||
|
@ -478,7 +478,15 @@ async def test_add_node(
|
|||||||
|
|
||||||
event = Event(
|
event = Event(
|
||||||
type="interview failed",
|
type="interview failed",
|
||||||
data={"source": "node", "event": "interview failed", "nodeId": 67},
|
data={
|
||||||
|
"source": "node",
|
||||||
|
"event": "interview failed",
|
||||||
|
"nodeId": 67,
|
||||||
|
"args": {
|
||||||
|
"errorMessage": "error",
|
||||||
|
"isFinal": True,
|
||||||
|
},
|
||||||
|
},
|
||||||
)
|
)
|
||||||
client.driver.receive_event(event)
|
client.driver.receive_event(event)
|
||||||
|
|
||||||
@ -1610,7 +1618,15 @@ async def test_replace_failed_node(
|
|||||||
|
|
||||||
event = Event(
|
event = Event(
|
||||||
type="interview failed",
|
type="interview failed",
|
||||||
data={"source": "node", "event": "interview failed", "nodeId": 67},
|
data={
|
||||||
|
"source": "node",
|
||||||
|
"event": "interview failed",
|
||||||
|
"nodeId": 67,
|
||||||
|
"args": {
|
||||||
|
"errorMessage": "error",
|
||||||
|
"isFinal": True,
|
||||||
|
},
|
||||||
|
},
|
||||||
)
|
)
|
||||||
client.driver.receive_event(event)
|
client.driver.receive_event(event)
|
||||||
|
|
||||||
@ -2193,7 +2209,15 @@ async def test_refresh_node_info(
|
|||||||
|
|
||||||
event = Event(
|
event = Event(
|
||||||
type="interview failed",
|
type="interview failed",
|
||||||
data={"source": "node", "event": "interview failed", "nodeId": 52},
|
data={
|
||||||
|
"source": "node",
|
||||||
|
"event": "interview failed",
|
||||||
|
"nodeId": 52,
|
||||||
|
"args": {
|
||||||
|
"errorMessage": "error",
|
||||||
|
"isFinal": True,
|
||||||
|
},
|
||||||
|
},
|
||||||
)
|
)
|
||||||
client.driver.receive_event(event)
|
client.driver.receive_event(event)
|
||||||
|
|
||||||
|
@ -215,17 +215,6 @@ async def test_node_status_state(
|
|||||||
assert len(calls) == 4
|
assert len(calls) == 4
|
||||||
assert calls[3].data["some"] == "dead - event - test_event4"
|
assert calls[3].data["some"] == "dead - event - test_event4"
|
||||||
|
|
||||||
event = Event(
|
|
||||||
"unknown",
|
|
||||||
data={
|
|
||||||
"source": "node",
|
|
||||||
"event": "unknown",
|
|
||||||
"nodeId": lock_schlage_be469.node_id,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
lock_schlage_be469.receive_event(event)
|
|
||||||
await hass.async_block_till_done()
|
|
||||||
|
|
||||||
|
|
||||||
async def test_config_parameter_state(
|
async def test_config_parameter_state(
|
||||||
hass, client, lock_schlage_be469, integration, calls
|
hass, client, lock_schlage_be469, integration, calls
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from zwave_js_server.const import CommandClass
|
|
||||||
from zwave_js_server.event import Event
|
from zwave_js_server.event import Event
|
||||||
from zwave_js_server.model.value import _get_value_id_from_dict, get_value_id
|
|
||||||
|
|
||||||
from homeassistant.components.zwave_js.diagnostics import async_get_device_diagnostics
|
from homeassistant.components.zwave_js.diagnostics import async_get_device_diagnostics
|
||||||
from homeassistant.components.zwave_js.helpers import get_device_id
|
from homeassistant.components.zwave_js.helpers import get_device_id
|
||||||
@ -43,9 +41,6 @@ async def test_device_diagnostics(
|
|||||||
assert device
|
assert device
|
||||||
|
|
||||||
# Update a value and ensure it is reflected in the node state
|
# Update a value and ensure it is reflected in the node state
|
||||||
value_id = get_value_id(
|
|
||||||
multisensor_6, CommandClass.SENSOR_MULTILEVEL, PROPERTY_ULTRAVIOLET
|
|
||||||
)
|
|
||||||
event = Event(
|
event = Event(
|
||||||
type="value updated",
|
type="value updated",
|
||||||
data={
|
data={
|
||||||
@ -75,18 +70,7 @@ async def test_device_diagnostics(
|
|||||||
"maxSchemaVersion": 0,
|
"maxSchemaVersion": 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Assert that the data returned doesn't match the stale node state data
|
assert diagnostics_data["state"] == multisensor_6.data
|
||||||
assert diagnostics_data["state"] != multisensor_6.data
|
|
||||||
|
|
||||||
# Replace data for the value we updated and assert the new node data is the same
|
|
||||||
# as what's returned
|
|
||||||
updated_node_data = multisensor_6.data.copy()
|
|
||||||
for idx, value in enumerate(updated_node_data["values"]):
|
|
||||||
if _get_value_id_from_dict(multisensor_6, value) == value_id:
|
|
||||||
updated_node_data["values"][idx] = multisensor_6.values[
|
|
||||||
value_id
|
|
||||||
].data.copy()
|
|
||||||
assert diagnostics_data["state"] == updated_node_data
|
|
||||||
|
|
||||||
|
|
||||||
async def test_device_diagnostics_error(hass, integration):
|
async def test_device_diagnostics_error(hass, integration):
|
||||||
|
@ -196,12 +196,16 @@ async def test_on_node_added_not_ready(
|
|||||||
assert len(hass.states.async_all()) == 0
|
assert len(hass.states.async_all()) == 0
|
||||||
assert not dev_reg.devices
|
assert not dev_reg.devices
|
||||||
|
|
||||||
|
node_state = deepcopy(zp3111_not_ready_state)
|
||||||
|
node_state["isSecure"] = False
|
||||||
|
|
||||||
event = Event(
|
event = Event(
|
||||||
type="node added",
|
type="node added",
|
||||||
data={
|
data={
|
||||||
"source": "controller",
|
"source": "controller",
|
||||||
"event": "node added",
|
"event": "node added",
|
||||||
"node": deepcopy(zp3111_not_ready_state),
|
"node": node_state,
|
||||||
|
"result": {},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
client.driver.receive_event(event)
|
client.driver.receive_event(event)
|
||||||
@ -317,12 +321,16 @@ async def test_existing_node_not_replaced_when_not_ready(
|
|||||||
assert state.name == "Custom Entity Name"
|
assert state.name == "Custom Entity Name"
|
||||||
assert not hass.states.get(motion_entity)
|
assert not hass.states.get(motion_entity)
|
||||||
|
|
||||||
|
node_state = deepcopy(zp3111_not_ready_state)
|
||||||
|
node_state["isSecure"] = False
|
||||||
|
|
||||||
event = Event(
|
event = Event(
|
||||||
type="node added",
|
type="node added",
|
||||||
data={
|
data={
|
||||||
"source": "controller",
|
"source": "controller",
|
||||||
"event": "node added",
|
"event": "node added",
|
||||||
"node": deepcopy(zp3111_not_ready_state),
|
"node": node_state,
|
||||||
|
"result": {},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
client.driver.receive_event(event)
|
client.driver.receive_event(event)
|
||||||
@ -838,9 +846,14 @@ async def test_node_removed(hass, multisensor_6_state, client, integration):
|
|||||||
dev_reg = dr.async_get(hass)
|
dev_reg = dr.async_get(hass)
|
||||||
node = Node(client, deepcopy(multisensor_6_state))
|
node = Node(client, deepcopy(multisensor_6_state))
|
||||||
device_id = f"{client.driver.controller.home_id}-{node.node_id}"
|
device_id = f"{client.driver.controller.home_id}-{node.node_id}"
|
||||||
event = {"node": node}
|
event = {
|
||||||
|
"source": "controller",
|
||||||
|
"event": "node added",
|
||||||
|
"node": node.data,
|
||||||
|
"result": {},
|
||||||
|
}
|
||||||
|
|
||||||
client.driver.controller.emit("node added", event)
|
client.driver.controller.receive_event(Event("node added", event))
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
old_device = dev_reg.async_get_device(identifiers={(DOMAIN, device_id)})
|
old_device = dev_reg.async_get_device(identifiers={(DOMAIN, device_id)})
|
||||||
assert old_device.id
|
assert old_device.id
|
||||||
@ -907,7 +920,7 @@ async def test_replace_same_node(
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"status": 4,
|
"status": 4,
|
||||||
"ready": False,
|
"ready": False,
|
||||||
"isSecure": "unknown",
|
"isSecure": False,
|
||||||
"interviewAttempts": 1,
|
"interviewAttempts": 1,
|
||||||
"endpoints": [{"nodeId": node_id, "index": 0, "deviceClass": None}],
|
"endpoints": [{"nodeId": node_id, "index": 0, "deviceClass": None}],
|
||||||
"values": [],
|
"values": [],
|
||||||
@ -922,6 +935,7 @@ async def test_replace_same_node(
|
|||||||
"timeoutResponse": 0,
|
"timeoutResponse": 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"result": {},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -1022,7 +1036,7 @@ async def test_replace_different_node(
|
|||||||
"index": 0,
|
"index": 0,
|
||||||
"status": 4,
|
"status": 4,
|
||||||
"ready": False,
|
"ready": False,
|
||||||
"isSecure": "unknown",
|
"isSecure": False,
|
||||||
"interviewAttempts": 1,
|
"interviewAttempts": 1,
|
||||||
"endpoints": [
|
"endpoints": [
|
||||||
{"nodeId": multisensor_6.node_id, "index": 0, "deviceClass": None}
|
{"nodeId": multisensor_6.node_id, "index": 0, "deviceClass": None}
|
||||||
@ -1039,6 +1053,7 @@ async def test_replace_different_node(
|
|||||||
"timeoutResponse": 0,
|
"timeoutResponse": 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"result": {},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -220,7 +220,15 @@ async def test_node_status_sensor_not_ready(
|
|||||||
assert hass.states.get(NODE_STATUS_ENTITY).state == "alive"
|
assert hass.states.get(NODE_STATUS_ENTITY).state == "alive"
|
||||||
|
|
||||||
# Mark node as ready
|
# Mark node as ready
|
||||||
event = Event("ready", {"nodeState": lock_id_lock_as_id150_state})
|
event = Event(
|
||||||
|
"ready",
|
||||||
|
{
|
||||||
|
"source": "node",
|
||||||
|
"event": "ready",
|
||||||
|
"nodeId": node.node_id,
|
||||||
|
"nodeState": lock_id_lock_as_id150_state,
|
||||||
|
},
|
||||||
|
)
|
||||||
node.receive_event(event)
|
node.receive_event(event)
|
||||||
assert node.ready
|
assert node.ready
|
||||||
assert hass.states.get(NODE_STATUS_ENTITY)
|
assert hass.states.get(NODE_STATUS_ENTITY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user