@@ -633,6 +633,9 @@ async def get_config_entry(self, entry_id: str) -> dict[str, Any]:
633633 """
634634 Get config entry details.
635635
636+ Note: Home Assistant doesn't have a direct REST API endpoint for individual
637+ config entries. This method lists all entries and filters by entry_id.
638+
636639 Args:
637640 entry_id: Config entry ID
638641
@@ -643,7 +646,23 @@ async def get_config_entry(self, entry_id: str) -> dict[str, Any]:
643646 HomeAssistantAPIError: If entry not found or API error
644647 """
645648 logger .debug (f"Getting config entry: { entry_id } " )
646- return await self ._request ("GET" , f"/config/config_entries/entry/{ entry_id } " )
649+ # List all entries and filter by entry_id
650+ entries = await self ._request ("GET" , "/config/config_entries/entry" )
651+
652+ if not isinstance (entries , list ):
653+ raise HomeAssistantAPIError (
654+ "Unexpected response format from config entries API" ,
655+ status_code = 500 ,
656+ )
657+
658+ for entry in entries :
659+ if entry .get ("entry_id" ) == entry_id :
660+ return entry
661+
662+ raise HomeAssistantAPIError (
663+ f"Config entry not found: { entry_id } " ,
664+ status_code = 404 ,
665+ )
647666
648667 async def send_websocket_message (self , message : dict [str , Any ]) -> dict [str , Any ]:
649668 """Send message via WebSocket and wait for response.
0 commit comments