Skip to content

Commit

Permalink
Fix stringification of discovered hassio uuid (#129797)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored and balloob committed Nov 4, 2024
1 parent 1ff0efc commit b1c9f83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/hassio/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ async def async_process_new(self, data: Discovery) -> None:
config=data.config,
name=addon_info.name,
slug=data.addon,
uuid=str(data.uuid),
uuid=data.uuid.hex,
),
discovery_key=discovery_flow.DiscoveryKey(
domain=DOMAIN,
key=str(data.uuid),
key=data.uuid.hex,
version=1,
),
)
Expand Down
8 changes: 4 additions & 4 deletions tests/components/hassio/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def test_hassio_discovery_startup(
},
name="Mosquitto Test",
slug="mosquitto",
uuid=str(uuid),
uuid=uuid.hex,
)
)

Expand Down Expand Up @@ -153,7 +153,7 @@ async def test_hassio_discovery_startup_done(
},
name="Mosquitto Test",
slug="mosquitto",
uuid=str(uuid),
uuid=uuid.hex,
)
)

Expand Down Expand Up @@ -203,7 +203,7 @@ async def test_hassio_discovery_webhook(
},
name="Mosquitto Test",
slug="mosquitto",
uuid=str(uuid),
uuid=uuid.hex,
)
)

Expand Down Expand Up @@ -286,7 +286,7 @@ async def test_hassio_rediscover(
)

expected_context = {
"discovery_key": DiscoveryKey(domain="hassio", key=str(uuid), version=1),
"discovery_key": DiscoveryKey(domain="hassio", key=uuid.hex, version=1),
"source": config_entries.SOURCE_HASSIO,
}

Expand Down

0 comments on commit b1c9f83

Please sign in to comment.