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
This commit is contained in:
Felix Zösch
2025-12-16 12:49:56 +01:00
parent 43f3a0d0b4
commit 9be64a0696
14 changed files with 2393 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
automation:
- alias: "Temperature-Based Climate Control"
id: climate_control_template
description: "Adjust climate control based on temperature"
trigger:
- trigger: numeric_state
entity_id: sensor.REPLACE_WITH_TEMPERATURE_SENSOR
below: 19 # Adjust threshold temperature
condition:
# Optional: Only when someone is home
- condition: state
entity_id: person.REPLACE_WITH_PERSON
state: "home"
action:
- action: climate.set_hvac_mode
target:
entity_id: climate.REPLACE_WITH_CLIMATE_DEVICE
data:
hvac_mode: heat # heat, cool, heat_cool, off, etc.
- action: climate.set_temperature
target:
entity_id: climate.REPLACE_WITH_CLIMATE_DEVICE
data:
temperature: 21 # Target temperature
- action: notify.notify
data:
message: "Heating turned on. Temperature: {{ states('sensor.REPLACE_WITH_TEMPERATURE_SENSOR') }}°C"

View File

@@ -0,0 +1,39 @@
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

View File

@@ -0,0 +1,34 @@
automation:
- alias: "Notification Automation"
id: notification_template
description: "Send notifications based on events or conditions"
trigger:
- trigger: state
entity_id: binary_sensor.REPLACE_WITH_SENSOR
to: "on"
condition:
# Optional: Only notify during specific times
- condition: time
after: "08:00:00"
before: "22:00:00"
action:
- action: notify.notify # Default notification service
data:
message: >
{{ trigger.to_state.attributes.friendly_name }} is now {{ trigger.to_state.state }}
at {{ now().strftime('%H:%M:%S') }}
title: "Home Assistant Alert"
# Optional: Send to specific mobile device
# - action: notify.mobile_app_REPLACE_WITH_DEVICE_NAME
# data:
# message: "Custom notification message"
# title: "Alert"
# data:
# # Optional: Add action buttons
# actions:
# - action: "ACTION_NAME"
# title: "Action Button"

View File

@@ -0,0 +1,57 @@
automation:
- alias: "Presence-Based Automation"
id: presence_detection_template
description: "React to people arriving or leaving home"
trigger:
- trigger: state
entity_id: person.REPLACE_WITH_PERSON
from: "not_home"
to: "home"
id: arriving
- trigger: state
entity_id: person.REPLACE_WITH_PERSON
from: "home"
to: "not_home"
id: leaving
action:
- choose:
# When arriving home
- conditions:
- condition: trigger
id: arriving
sequence:
- action: light.turn_on
target:
area_id: entrance
- action: climate.set_temperature
target:
entity_id: climate.REPLACE_WITH_CLIMATE_DEVICE
data:
temperature: 22
- action: notify.mobile_app_REPLACE_WITH_DEVICE
data:
message: "Welcome home!"
# When leaving home
- conditions:
- condition: trigger
id: leaving
sequence:
- action: light.turn_off
target:
entity_id: all
- action: climate.set_hvac_mode
target:
entity_id: climate.REPLACE_WITH_CLIMATE_DEVICE
data:
hvac_mode: "off"
- action: notify.mobile_app_REPLACE_WITH_DEVICE
data:
message: "Goodbye! Home secured."

View File

@@ -0,0 +1,31 @@
automation:
- alias: "Time-Based Automation"
id: time_based_template
description: "Execute actions at a specific time"
trigger:
- trigger: time
at: "07:00:00" # Replace with desired time (24-hour format)
condition:
# Optional: Only on specific days
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
# Add your actions here
- action: light.turn_on
target:
entity_id: light.REPLACE_WITH_LIGHT
data:
brightness: 128
- action: notify.notify
data:
message: "Good morning! Time-based automation triggered."
title: "Morning Routine"