diff --git a/homeassistant/components/zwave_js/diagnostics.py b/homeassistant/components/zwave_js/diagnostics.py index 078bd761b71..33d32e96fe0 100644 --- a/homeassistant/components/zwave_js/diagnostics.py +++ b/homeassistant/components/zwave_js/diagnostics.py @@ -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) diff --git a/tests/components/zwave_js/test_diagnostics.py b/tests/components/zwave_js/test_diagnostics.py index 9f3a7b0884c..41505364111 100644 --- a/tests/components/zwave_js/test_diagnostics.py +++ b/tests/components/zwave_js/test_diagnostics.py @@ -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