get_sun_times
Retrieve sunrise, sunset, and twilight times based on your home coordinates to automate lighting or scheduling.
Instructions
Get sun times (sunrise, sunset, twilight) based on home coordinates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/domoticz_mcp/server.py:894-898 (handler)The get_sun_times tool handler function. It makes an HTTP GET request to the Domoticz API endpoint 'getsunrisenset' to retrieve sun times (sunrise, sunset, twilight) based on home coordinates.
async def get_sun_times() -> str: """Get sun times (sunrise, sunset, twilight) based on home coordinates.""" async with create_client() as client: response = await _do_request(client, "GET", f"{DOMOTICZ_API_URL}?type=command¶m=getsunrisenset") return response.text - src/domoticz_mcp/server.py:894-894 (registration)The tool is registered with the MCP server via the @mcp.tool() decorator on line 893, which is how FastMCP registers functions as tools.
async def get_sun_times() -> str: