Fix device source for Utility Meter (#95585)

* Fix Device Source

* Remove debug
This commit is contained in:
dougiteixeira 2023-06-29 22:52:48 -03:00 committed by GitHub
parent 734614bdda
commit f2f0c38fae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -142,6 +142,7 @@ async def async_setup_entry(
):
device_info = DeviceInfo(
identifiers=device.identifiers,
connections=device.connections,
)
else:
device_info = None

View File

@ -1469,6 +1469,7 @@ async def test_device_id(hass: HomeAssistant) -> None:
source_device_entry = device_registry.async_get_or_create(
config_entry_id=source_config_entry.entry_id,
identifiers={("sensor", "identifier_test")},
connections={("mac", "30:31:32:33:34:35")},
)
source_entity = entity_registry.async_get_or_create(
"sensor",