Return property_key in zwave_js get_config_parameters websocket (#47808)

This commit is contained in:
Charles Garwood 2021-03-12 13:49:59 -05:00 committed by GitHub
parent 3115bf9aab
commit 13cd2f52d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -371,6 +371,7 @@ def websocket_get_config_parameters(
metadata = zwave_value.metadata
result[value_id] = {
"property": zwave_value.property_,
"property_key": zwave_value.property_key,
"configuration_value_type": zwave_value.configuration_value_type.value,
"metadata": {
"description": metadata.description,

View File

@ -73,10 +73,14 @@ async def test_websocket_api(hass, integration, multisensor_6, hass_ws_client):
assert len(result) == 61
key = "52-112-0-2"
assert result[key]["property"] == 2
assert result[key]["property_key"] is None
assert result[key]["metadata"]["type"] == "number"
assert result[key]["configuration_value_type"] == "enumerated"
assert result[key]["metadata"]["states"]
key = "52-112-0-201-255"
assert result[key]["property_key"] == 255
# Test getting non-existent node fails
await ws_client.send_json(
{