---
id: daily-home-assistant-automation
name: "home-assistant-automation"
url: https://skills.yangsir.net/skill/daily-home-assistant-automation
author: claude-office-skills
domain: automation
tags: ["home-automation", "smart-home", "iot", "automation", "workflow"]
install_count: 1785
rating: 4.30 (71 reviews)
github: https://github.com/claude-office-skills/skills
---

# home-assistant-automation

> 智能家居自动化，控制灯光、传感器和设备，创建智能联动和工作流

**Stats**: 1,785 installs · 4.3/5 (71 reviews)

## Before / After 对比

### 智能家居配置

**Before**:

使用多个智能设备 App，无法跨品牌联动，需要手动控制每个设备

**After**:

统一控制所有设备，创建自动化场景和联动规则

| Metric | Before | After | Change |
|---|---|---|---|
| 设备控制时间 | 5min/day | 0.5min/day | -90% |
| 自动化场景数 | 0个 | 20个 | 0% |

## Readme

# home-assistant-automation

# Home Assistant Automation

Automate smart home devices and create intelligent automation workflows.

## Core Capabilities

### Device Control

```
device_commands:
  lights:
    - turn_on:
        entity_id: light.living_room
        brightness_pct: 80
        color_temp: 350
    - turn_off:
        entity_id: light.all_lights
        
  climate:
    - set_temperature:
        entity_id: climate.main_thermostat
        temperature: 72
        hvac_mode: heat
        
  media:
    - media_play_pause:
        entity_id: media_player.living_room_tv
    - volume_set:
        entity_id: media_player.sonos
        volume_level: 0.5

```

### Automation Templates

```
automations:
  morning_routine:
    trigger:
      - platform: time
        at: "06:30:00"
      - platform: state
        entity_id: binary_sensor.alarm
        to: "off"
    condition:
      - condition: state
        entity_id: person.owner
        state: "home"
    action:
      - service: light.turn_on
        target:
          entity_id: light.bedroom
        data:
          brightness_pct: 30
          transition: 300
      - service: climate.set_temperature
        data:
          temperature: 72
      - delay: "00:05:00"
      - service: media_player.play_media
        data:
          media_content_type: music
          media_content_id: "news_briefing"

  away_mode:
    trigger:
      platform: state
      entity_id: group.family
      to: "not_home"
      for: "00:10:00"
    action:
      - service: climate.set_preset_mode
        data:
          preset_mode: away
      - service: light.turn_off
        target:
          entity_id: all
      - service: lock.lock
        target:
          entity_id: lock.front_door

```

### Scenes

```
scenes:
  movie_night:
    entities:
      light.living_room:
        state: on
        brightness: 20
        color_temp: 500
      light.tv_backlight:
        state: on
        rgb_color: [0, 0, 255]
      media_player.soundbar:
        state: on
        source: "TV"
      cover.blinds:
        state: closed
        
  good_night:
    entities:
      light.all_lights:
        state: off
      lock.all_locks:
        state: locked
      alarm_control_panel.home:
        state: armed_night
      climate.thermostat:
        temperature: 68

```

### Voice Commands

```
voice_intents:
  - intent: "Turn on the lights"
    action: light.turn_on
    entity: light.all_lights
    
  - intent: "Set temperature to {temp}"
    action: climate.set_temperature
    entity: climate.thermostat
    data:
      temperature: "{{ temp }}"
      
  - intent: "I'm leaving"
    action: script.away_mode

```

## Integration Examples

### Energy Monitoring

```
energy_dashboard:
  sensors:
    - sensor.electricity_usage
    - sensor.solar_production
    - sensor.battery_level
  automations:
    - name: "Off-peak charging"
      trigger:
        platform: time
        at: "00:00:00"
      action:
        service: switch.turn_on
        entity_id: switch.ev_charger

```

### Security System

```
security:
  motion_detection:
    trigger:
      platform: state
      entity_id: binary_sensor.motion_front
      to: "on"
    condition:
      - condition: state
        entity_id: alarm_control_panel.home
        state: armed_away
    action:
      - service: camera.snapshot
        entity_id: camera.front_door
      - service: notify.mobile_app
        data:
          message: "Motion detected at front door"
          data:
            image: "/local/snapshots/front_door.jpg"

```

## Best Practices

- **Entity Naming**: Use consistent naming conventions

- **Groups**: Organize devices logically

- **Conditions**: Always add appropriate conditions

- **Notifications**: Don't over-notify

- **Testing**: Test automations thoroughly

- **Backup**: Regular configuration backups

Weekly Installs–Repository[claude-office-s…s/skills](https://github.com/claude-office-skills/skills)GitHub Stars24First Seen–Security Audits[Gen Agent Trust HubPass](/claude-office-skills/skills/home-assistant-automation/security/agent-trust-hub)[SocketPass](/claude-office-skills/skills/home-assistant-automation/security/socket)[SnykPass](/claude-office-skills/skills/home-assistant-automation/security/snyk)

---
*Source: https://skills.yangsir.net/skill/daily-home-assistant-automation*
*Markdown mirror: https://skills.yangsir.net/api/skill/daily-home-assistant-automation/markdown*