Add value ID to zwave_js device diagnostics (#78015)

This commit is contained in:
Raman Gupta 2022-09-08 03:13:01 -04:00 committed by GitHub
parent 1802ecfc24
commit 37631d2017
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -123,6 +123,7 @@ def get_device_entities(
"entity_category": entry.entity_category,
"supported_features": entry.supported_features,
"unit_of_measurement": entry.unit_of_measurement,
"value_id": value_id,
"primary_value": primary_value_data,
}
entities.append(entity)

View file

@ -152,6 +152,7 @@ async def test_device_diagnostics_missing_primary_value(
x for x in diagnostics_data["entities"] if x["entity_id"] == entity_id
)
assert air_entity["value_id"] == value.value_id
assert air_entity["primary_value"] == {
"command_class": value.command_class,
"command_class_name": value.command_class_name,
@ -189,4 +190,5 @@ async def test_device_diagnostics_missing_primary_value(
x for x in diagnostics_data["entities"] if x["entity_id"] == entity_id
)
assert air_entity["value_id"] == value.value_id
assert air_entity["primary_value"] is None