Skip to content

Commit 5da6509

Browse files
zzstoatzzclaudejlowingithub-actions[bot]
authored
fix phue2 import in smart_home example (#2999)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
1 parent 311e173 commit 5da6509

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/smart_home/src/smart_home/hub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from mcp.types import ToolAnnotations
2-
from phue2 import Bridge
2+
from phue import Bridge
33

44
from fastmcp import FastMCP
55
from smart_home.lights.server import lights_mcp

examples/smart_home/src/smart_home/lights/hue_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from 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

66
from smart_home.settings import settings
77

@@ -23,12 +23,12 @@ def _get_bridge() -> Bridge | None:
2323
def 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

examples/smart_home/src/smart_home/lights/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Annotated, Any, Literal, TypedDict
99

1010
from mcp.types import ToolAnnotations
11-
from phue2.exceptions import PhueException
11+
from phue.exceptions import PhueException
1212
from pydantic import Field
1313
from typing_extensions import NotRequired
1414

0 commit comments

Comments
 (0)