Device controller

From autonomous-ai/autonomous-intern · View interactive version

Device controller is an AI agent skill from the GitHub repository autonomous-ai/autonomous-intern. Controls Home Assistant smart home devices including lights, switches, climate, locks, covers, and media players by calling the appropriate HA service via the REST API. Use when the user says "turn on the lights", "turn off the fan", "set brightness to 50%", "lock the front door", "set thermostat to

How to use this skill

Skill file

Device Controller

Quick Start

Map the user's natural language command to the correct Home Assistant domain and service, build the service call payload, and execute it via POST /api/services/<domain>/<service>. Confirm the resulting state.

Workflow

  1. Parse the user's intent: identify the target device (entity_id) and desired action
  2. Map the action to the correct HA domain and service (see Rules for the full map)
  3. Build the JSON payload with entity_id and any additional parameters (brightness, temperature, color, etc.)
  4. Call POST /api/services/<domain>/<service> with the payload
  5. Confirm the new state by calling GET /api/states/<entity_id>
  6. Return a structured confirmation with the before/after state

Examples

Example 1: Control a light with brightness

Input: "Turn on the living room lights at 60% brightness with warm white"

Output:

DEVICE COMMAND
==============
Entity:  light.living_room
Service: light.turn_on
Payload: {
  "entity_id": "light.living_room",
  "brightness_pct": 60,
  "color_temp_kelvin": 2700
}

RESULT
======
Status:      200 OK
New State:   on
Brightness:  153 (60%)
Color Temp:  2700K (warm white)

Example 2: Set thermostat temperature

Input: "Set the downstairs thermostat to 72°F in cooling mode"

Output:

DEVICE COMMAND
==============
Entity:  climate.downstairs_thermostat
Service: climate.set_temperature
Payload: {
  "entity_id": "climate.downstairs_thermostat",
  "temperature": 72,
  "hvac_mode": "cool"
}

RESULT
======
Status:       200 OK
HVAC Mode:    cool
Target Temp:  72°F
Current Temp: 76°F

Example 3: Lock the front door

Input: "Lock the front door"

Output:

DEVICE COMMAND
==============
Entity:  lock.front_door
Service: lock.lock
Payload: { "entity_id": "lock.front_door" }

RESULT
======
Status:    200 OK
New State: locked

Tools

Error Handling

Connectors (Optional)

This skill works standalone. When connected to external tools, it unlocks additional capabilities:

| Connector | What it enables |

|-----------|----------------|

| ~~home assistant | Send commands to devices via the Home Assistant REST API |

| ~~IoT platform | Control devices across multiple smart home ecosystems |

| ~~voice assistant | Accept voice commands for hands-free device control |

Rules

Service map by domain:

Output Template

DEVICE COMMAND
==============
Entity:  [entity_id]
Service: [domain.service]
Payload: [JSON payload]

RESULT
======
Status:    [HTTP status]
New State: [state value]
[Additional state attributes if relevant]

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.