mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Add value ID to zwave_js device diagnostics (#78015)
This commit is contained in:
parent
1802ecfc24
commit
37631d2017
@ -123,6 +123,7 @@ def get_device_entities(
|
|||||||
"entity_category": entry.entity_category,
|
"entity_category": entry.entity_category,
|
||||||
"supported_features": entry.supported_features,
|
"supported_features": entry.supported_features,
|
||||||
"unit_of_measurement": entry.unit_of_measurement,
|
"unit_of_measurement": entry.unit_of_measurement,
|
||||||
|
"value_id": value_id,
|
||||||
"primary_value": primary_value_data,
|
"primary_value": primary_value_data,
|
||||||
}
|
}
|
||||||
entities.append(entity)
|
entities.append(entity)
|
||||||
|
@ -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
|
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"] == {
|
assert air_entity["primary_value"] == {
|
||||||
"command_class": value.command_class,
|
"command_class": value.command_class,
|
||||||
"command_class_name": value.command_class_name,
|
"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
|
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
|
assert air_entity["primary_value"] is None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user