Files
claude-skills/skills/homeassistant/assets/automation_templates/motion_light.yaml
Felix Zösch 9be64a0696 Add homeassistant skill in unpacked format
- Add complete homeassistant skill source to skills/ directory
- Includes all scripts, references, and automation templates
- Matches format of other skills in repository
2025-12-16 12:49:56 +01:00

40 lines
1.0 KiB
YAML

automation:
- alias: "Motion-Activated Light"
id: motion_light_template
description: "Turn on lights when motion detected, turn off after motion stops"
trigger:
- trigger: state
entity_id: binary_sensor.REPLACE_WITH_MOTION_SENSOR
to: "on"
condition:
# Optional: Only trigger during dark hours
- condition: sun
after: sunset
before: sunrise
action:
# Turn on the light
- action: light.turn_on
target:
entity_id: light.REPLACE_WITH_LIGHT
data:
brightness: 255 # Adjust brightness (0-255)
# Wait for motion to stop
- wait_for_trigger:
- trigger: state
entity_id: binary_sensor.REPLACE_WITH_MOTION_SENSOR
to: "off"
for:
minutes: 5 # Adjust delay before turning off
timeout:
hours: 2 # Maximum time to wait
continue_on_timeout: true
# Turn off the light
- action: light.turn_off
target:
entity_id: light.REPLACE_WITH_LIGHT