Fix hw_version not updating from an entity device_info (#62254)

pull/62157/head
J. Nick Koston 2021-12-18 23:53:49 -06:00 committed by GitHub
parent 8d6763eaad
commit a40549c1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -474,6 +474,7 @@ class EntityPlatform:
"name",
"suggested_area",
"sw_version",
"hw_version",
"via_device",
):
if key in device_info:

View File

@ -838,6 +838,7 @@ async def test_device_info_called(hass):
"model": "test-model",
"name": "test-name",
"sw_version": "test-sw",
"hw_version": "test-hw",
"suggested_area": "Heliport",
"entry_type": dr.DeviceEntryType.SERVICE,
"via_device": ("hue", "via-id"),
@ -869,6 +870,7 @@ async def test_device_info_called(hass):
assert device.name == "test-name"
assert device.suggested_area == "Heliport"
assert device.sw_version == "test-sw"
assert device.hw_version == "test-hw"
assert device.via_device_id == via.id