File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
examples/smart_home/src/smart_home Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11from mcp .types import ToolAnnotations
2- from phue2 import Bridge
2+ from phue import Bridge
33
44from fastmcp import FastMCP
55from smart_home .lights .server import lights_mcp
Original file line number Diff line number Diff line change 11from typing import Any
22
3- from phue2 import Bridge
4- from phue2 .exceptions import PhueException
3+ from phue import Bridge
4+ from phue .exceptions import PhueException
55
66from smart_home .settings import settings
77
@@ -23,12 +23,12 @@ def _get_bridge() -> Bridge | None:
2323def handle_phue_error (
2424 light_or_group : str , operation : str , error : Exception
2525) -> dict [str , Any ]:
26- """Creates a standardized error response for phue2 operations."""
26+ """Creates a standardized error response for phue operations."""
2727 base_info = {"target" : light_or_group , "operation" : operation , "success" : False }
2828 if isinstance (error , KeyError ):
2929 base_info ["error" ] = f"Target '{ light_or_group } ' not found"
3030 elif isinstance (error , PhueException ):
31- base_info ["error" ] = f"phue2 error during { operation } : { error } "
31+ base_info ["error" ] = f"phue error during { operation } : { error } "
3232 else :
3333 base_info ["error" ] = f"Unexpected error during { operation } : { error } "
3434 return base_info
Original file line number Diff line number Diff line change 88from typing import Annotated , Any , Literal , TypedDict
99
1010from mcp .types import ToolAnnotations
11- from phue2 .exceptions import PhueException
11+ from phue .exceptions import PhueException
1212from pydantic import Field
1313from typing_extensions import NotRequired
1414
You can’t perform that action at this time.
0 commit comments