wyze_clear_light_timer
Clear scheduled timers for Wyze lights by specifying the device MAC address. Use this tool to reset or cancel automated lighting routines in your smart home setup.
Instructions
Clear any scheduled timers for a Wyze light
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_mac | Yes |
Implementation Reference
- src/mcp_wyze_server/server.py:533-554 (handler)The @mcp.tool() decorated handler function implementing wyze_clear_light_timer. It clears scheduled timers for the specified Wyze light device using the wyze-sdk Client's bulbs.clear_timer method, with error handling and device validation.@mcp.tool() def wyze_clear_light_timer(device_mac: str) -> Dict[str, str]: """Clear any scheduled timers for a Wyze light""" 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.clear_timer( device_mac=device_mac, device_model=getattr(device, 'product_model', 'Unknown') ) return {"status": "success", "message": f"Cleared timer for {device.nickname}"} 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)}"}