Home Commander — Environment Control
Controls smart home and computing environment via Home Assistant. Manages scene modes, device control, and presence-based actions.
Data File: data/home-config.json
{
"scenes": {
"study": { "lights": { "desk_lamp": { "on": true, "brightness": 100, "color_temp": "cool" } }, "music": { "playlist": "lofi-focus", "volume": 25 }, "other": { "dnd": true } },
"chill": { "lights": { "desk_lamp": { "on": true, "brightness": 40, "color_temp": "warm" } }, "music": { "playlist": "chill-vibes", "volume": 35 }, "other": {} },
"sleep": { "lights": {}, "music": { "playlist": "white-noise", "volume": 15 }, "other": {} }
},
"devices": {
"desk_lamp": { "entity_id": "light.desk_lamp", "type": "light" },
"speaker": { "entity_id": "media_player.room_speaker", "type": "media_player" }
},
"home_assistant": { "url": "http://homeassistant.local:8123", "token_env": "HA_TOKEN" }
}
Scene Activation
When user says "study mode", "chill mode", etc.:
- Read scene definition from
data/home-config.json
- Execute each device command via Home Assistant API
- Confirm briefly: "Study mode ✓ — desk lamp bright, lo-fi on, DND"
Home Assistant API
# Light control
curl -s -X POST "$HA_URL/api/services/light/turn_on" \
-H "Authorization: Bearer $HA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_id": "light.desk_lamp", "brightness_pct": 100}'
# Media playback
curl -s -X POST "$HA_URL/api/services/media_player/play_media" \
-H "Authorization: Bearer $HA_TOKEN" \
-d '{"entity_id": "media_player.speaker", "media_content_id": "spotify:playlist:xxx", "media_content_type": "playlist"}'
# Wake-on-LAN
curl -s -X POST "$HA_URL/api/services/wake_on_lan/send_magic_packet" \
-H "Authorization: Bearer $HA_TOKEN" \
-d '{"mac": "XX:XX:XX:XX:XX:XX"}'
Quick Commands
- "lights off" → turn off all lights
- "dim the lights" → all lights to 20%
- "play some music" → default to chill playlist
- "it's cold" → thermostat up 2°F
- "turn on my PC" → WOL packet
- "goodnight" → sleep mode
- "I'm heading out" → lights off, eco mode
- "I'm home" → scene based on time of day
Instructions
- Read
data/home-config.json for device mappings and scenes
- Confirm actions in ONE short message
- If a device fails, report which one and suggest a fix
- Never execute "turn off all devices" without confirmation
- If Home Assistant is unreachable, report and suggest checking connection
- Device entity_ids must be configured by user — prompt if missing
1---
2name: lofy-home
3description: Smart home control for the Lofy AI assistant — scene modes (study, chill, sleep, morning, grind), device management via Home Assistant REST API, presence-based automation, natural language commands for lights, music, thermostat, and PC wake-on-LAN. Use when controlling smart home devices, activating scene modes, or managing home automation.
4metadata:
5 source: https://skillmd.com/skills/modbender/lofy-home
6---
7
8# Home Commander — Environment Control
9
10Controls smart home and computing environment via Home Assistant. Manages scene modes, device control, and presence-based actions.
11
12## Data File: `data/home-config.json`
13
14```json
15{
16 "scenes": {
17 "study": { "lights": { "desk_lamp": { "on": true, "brightness": 100, "color_temp": "cool" } }, "music": { "playlist": "lofi-focus", "volume": 25 }, "other": { "dnd": true } },
18 "chill": { "lights": { "desk_lamp": { "on": true, "brightness": 40, "color_temp": "warm" } }, "music": { "playlist": "chill-vibes", "volume": 35 }, "other": {} },
19 "sleep": { "lights": {}, "music": { "playlist": "white-noise", "volume": 15 }, "other": {} }
20 },
21 "devices": {
22 "desk_lamp": { "entity_id": "light.desk_lamp", "type": "light" },
23 "speaker": { "entity_id": "media_player.room_speaker", "type": "media_player" }
24 },
25 "home_assistant": { "url": "http://homeassistant.local:8123", "token_env": "HA_TOKEN" }
26}
27```
28
29## Scene Activation
30
31When user says "study mode", "chill mode", etc.:
321. Read scene definition from `data/home-config.json`
332. Execute each device command via Home Assistant API
343. Confirm briefly: "Study mode ✓ — desk lamp bright, lo-fi on, DND"
35
36### Home Assistant API
37
38```bash
39# Light control
40curl -s -X POST "$HA_URL/api/services/light/turn_on" \
41 -H "Authorization: Bearer $HA_TOKEN" \
42 -H "Content-Type: application/json" \
43 -d '{"entity_id": "light.desk_lamp", "brightness_pct": 100}'
44
45# Media playback
46curl -s -X POST "$HA_URL/api/services/media_player/play_media" \
47 -H "Authorization: Bearer $HA_TOKEN" \
48 -d '{"entity_id": "media_player.speaker", "media_content_id": "spotify:playlist:xxx", "media_content_type": "playlist"}'
49
50# Wake-on-LAN
51curl -s -X POST "$HA_URL/api/services/wake_on_lan/send_magic_packet" \
52 -H "Authorization: Bearer $HA_TOKEN" \
53 -d '{"mac": "XX:XX:XX:XX:XX:XX"}'
54```
55
56## Quick Commands
57
58- "lights off" → turn off all lights
59- "dim the lights" → all lights to 20%
60- "play some music" → default to chill playlist
61- "it's cold" → thermostat up 2°F
62- "turn on my PC" → WOL packet
63- "goodnight" → sleep mode
64- "I'm heading out" → lights off, eco mode
65- "I'm home" → scene based on time of day
66
67## Instructions
68
691. Read `data/home-config.json` for device mappings and scenes
702. Confirm actions in ONE short message
713. If a device fails, report which one and suggest a fix
724. Never execute "turn off all devices" without confirmation
735. If Home Assistant is unreachable, report and suggest checking connection
746. Device entity_ids must be configured by user — prompt if missing