wyze_set_light_effect
Set visual effects like color patterns or animations on Wyze light strips and compatible bulbs. Specify the device MAC and desired effect to customize lighting displays.
Instructions
Set visual effect for a Wyze light strip or compatible bulb
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_mac | Yes | ||
| effect | Yes |
Implementation Reference
- src/mcp_wyze_server/server.py:482-504 (handler)The main handler function for the 'wyze_set_light_effect' tool. It is decorated with @mcp.tool() which also serves as the registration. The function uses the Wyze SDK to set a light effect on the specified device by MAC address, checking device type compatibility and handling errors.@mcp.tool() def wyze_set_light_effect(device_mac: str, effect: str) -> Dict[str, str]: """Set visual effect for a Wyze light strip or compatible bulb""" try: client = get_wyze_client() devices = client.devices_list() for device in devices: if device.mac == device_mac and getattr(device, 'product_type', 'Unknown') in ['Light', 'Bulb', 'MeshLight', 'LightStrip']: client.bulbs.set_effect( device_mac=device_mac, device_model=getattr(device, 'product_model', 'Unknown'), effect=effect ) return {"status": "success", "message": f"Set {device.nickname} effect to {effect}"} return {"status": "error", "message": f"Light with MAC {device_mac} not found"} except WyzeClientConfigurationError as e: return {"status": "error", "message": f"Configuration error: {str(e)}"} except WyzeRequestError as e: return {"status": "error", "message": f"API error: {str(e)}"} except Exception as e: return {"status": "error", "message": f"Unexpected error: {str(e)}"}