File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
homeassistant/components/analytics Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ async def async_devices_payload(hass: HomeAssistant) -> dict:
551551 for domain , integration_info in integration_inputs .items ()
552552 if (integration := integrations .get (domain )) is not None
553553 and integration .is_built_in
554- and integration .integration_type in ("device" , "hub" )
554+ and integration .manifest . get ( " integration_type" ) in ("device" , "hub" )
555555 }
556556
557557 # Call integrations that implement the analytics platform
Original file line number Diff line number Diff line change @@ -934,6 +934,7 @@ def __init__(
934934 def mock_manifest (self ):
935935 """Generate a mock manifest to represent this module."""
936936 return {
937+ "integration_type" : "hub" ,
937938 ** loader .manifest_from_legacy_module (self .DOMAIN , self ),
938939 ** (self ._partial_manifest or {}),
939940 }
Original file line number Diff line number Diff line change @@ -1195,7 +1195,7 @@ async def test_devices_payload_with_entities(
11951195 # Entity from a different integration
11961196 entity_registry .async_get_or_create (
11971197 domain = "light" ,
1198- platform = "roomba " ,
1198+ platform = "shelly " ,
11991199 unique_id = "1" ,
12001200 device_id = device_entry .id ,
12011201 has_entity_name = True ,
@@ -1296,7 +1296,7 @@ async def test_devices_payload_with_entities(
12961296 },
12971297 ],
12981298 },
1299- "roomba " : {
1299+ "shelly " : {
13001300 "devices" : [],
13011301 "entities" : [
13021302 {
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ async def test_download_diagnostics(
197197 "codeowners" : ["test" ],
198198 "dependencies" : [],
199199 "domain" : "fake_integration" ,
200+ "integration_type" : "hub" ,
200201 "is_built_in" : True ,
201202 "overwrites_built_in" : False ,
202203 "name" : "fake_integration" ,
@@ -301,6 +302,7 @@ async def test_download_diagnostics(
301302 "codeowners" : [],
302303 "dependencies" : [],
303304 "domain" : "fake_integration" ,
305+ "integration_type" : "hub" ,
304306 "is_built_in" : True ,
305307 "overwrites_built_in" : False ,
306308 "name" : "fake_integration" ,
You can’t perform that action at this time.
0 commit comments