用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ChenKuanSun/MobileClaw --skill smart-home命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | smart-home |
| description | Control smart home devices via Home Assistant |
| version | 1.0 |
| author | MobileClaw Built-in |
| tools_required | http |
You help the user control their smart home devices through Home Assistant's REST API. Turn lights on/off, adjust thermostats, check sensor states, and run automations. Keywords: "turn on light", "turn off light", "smart home", "home assistant", "開燈", "關燈", "關冷氣", "開冷氣", "set temperature", "溫度", "device", "sensor"
The user needs:
http://192.168.1.100:8123 or https://xxxxx.ui.nabu.casa{HA_URL}/apiAuthorization: Bearer {HA_TOKEN}Content-Type: application/jsonVerify Home Assistant is reachable.
http GET {HA_URL}/api/
Headers: Authorization: Bearer {HA_TOKEN}
{"message": "API running."}Get current state of all entities.
http GET {HA_URL}/api/states
Headers: Authorization: Bearer {HA_TOKEN}
entity_id: e.g., light.living_room, switch.fan, climate.bedroomstate: e.g., "on", "off", "21.5", "unavailable"attributes: brightness, color_temp, friendly_name, etc.light.*switch.*climate.*sensor.*cover.*media_player.*http GET {HA_URL}/api/states/{entity_id}
Headers: Authorization: Bearer {HA_TOKEN}
Example: http GET {HA_URL}/api/states/light.living_roomhttp POST {HA_URL}/api/services/light/turn_on
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "light.living_room"}
http POST {HA_URL}/api/services/light/turn_on
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {
"entity_id": "light.living_room",
"brightness": 200,
"color_temp": 350
}
Body: {
"entity_id": "light.bedroom_strip",
"rgb_color": [255, 150, 50],
"brightness": 180
}
http POST {HA_URL}/api/services/light/turn_off
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "light.living_room"}
http POST {HA_URL}/api/services/switch/turn_on
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "switch.bedroom_fan"}
http POST {HA_URL}/api/services/switch/turn_off
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "switch.bedroom_fan"}
http POST {HA_URL}/api/services/switch/toggle
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "switch.bedroom_fan"}
http POST {HA_URL}/api/services/climate/set_temperature
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {
"entity_id": "climate.living_room_ac",
"temperature": 24
}
http POST {HA_URL}/api/services/climate/set_hvac_mode
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {
"entity_id": "climate.living_room_ac",
"hvac_mode": "cool"
}
http POST {HA_URL}/api/services/climate/set_hvac_mode
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {
"entity_id": "climate.living_room_ac",
"hvac_mode": "off"
}
http POST {HA_URL}/api/services/cover/open_cover
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "cover.living_room_blinds"}
http POST {HA_URL}/api/services/cover/close_cover
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "cover.living_room_blinds"}
http POST {HA_URL}/api/services/cover/set_cover_position
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "cover.living_room_blinds", "position": 50}
http POST {HA_URL}/api/services/automation/trigger
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "automation.good_night_routine"}
http POST {HA_URL}/api/services/script/turn_on
Headers: Authorization: Bearer {HA_TOKEN}, Content-Type: application/json
Body: {"entity_id": "script.movie_mode"}
http GET {HA_URL}/api/states/sensor.living_room_temperature
Headers: Authorization: Bearer {HA_TOKEN}
state field contains the value, attributes.unit_of_measurement has the unit{domain}.{object_id}, e.g., light.kitchen, climate.bedroom_acattributes.unit_of_measurement