Skip to content
Back to skills

Control Office Lamp

ASecurity

Control office lamp via Home Assistant. Use when the user asks to turn on, turn off, or toggle their office lamp, or check its status. Triggers on phrases like "turn on my lamp", "office light on/off", "toggle the lamp", or "is my lamp on".

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
toolsbashapi

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill control-office-lamp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Control Office Lamp?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Control Office Lamp
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-control-office-lamp/badge)](https://www.skillsdirectory.com/skills/majiayu000-control-office-lamp)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: control-office-lamp
description: Control office lamp via Home Assistant. Use when the user asks to turn on, turn off, or toggle their office lamp, or check its status. Triggers on phrases like "turn on my lamp", "office light on/off", "toggle the lamp", or "is my lamp on".
allowed-tools:
  - Bash
  - Read
---

# Home Assistant Office Lamp Control

Control the office lamp through Home Assistant's REST API.

## Setup (First-Time Only)

Create your config file at `~/.claude/skill-config/control-office-lamp/config.json`:

```json
{
  "url": "http://your-home-assistant:8123",
  "token": "YOUR_LONG_LIVED_ACCESS_TOKEN_HERE",
  "entity_id": "light.office_lamp"
}
```

This location persists across skill updates.

To create a Long-Lived Access Token:
1. Open Home Assistant -> Profile (bottom-left)
2. Scroll to "Long-Lived Access Tokens" -> Create Token
3. Copy the token into config.json

**Config lookup order:**
1. `HA_CONFIG_PATH` environment variable
2. `~/.claude/skill-config/control-office-lamp/config.json` (recommended)
3. `${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/config.json` (plugin root)
4. `<script-directory>/../config.json` (fallback)

## Usage

The script is located relative to the plugin root using `${CLAUDE_PLUGIN_ROOT}`:

```bash
# Turn lamp on
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" on

# Turn lamp off
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" off

# Toggle lamp state
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" toggle

# Check current status
uv run "${CLAUDE_PLUGIN_ROOT}/skills/control-office-lamp/scripts/lamp_control.py" status
```

## Response Handling

**Success response:**
```json
{"success": true, "action": "turn_on", "entity_id": "light.office_lamp", "response": [...]}
```

**Error response:**
```json
{"success": false, "error": "Connection failed: ..."}
```

If errors occur, verify:
1. Home Assistant is running at the configured URL
2. The token is valid and not expired
3. The entity_id exists in Home Assistant

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.