Skip to content

Instantly share code, notes, and snippets.

View peyanski's full-sized avatar

Kiril Peyanski peyanski

View GitHub Profile
alias: Weather and comfort report
sequence:
- action: ai_task.generate_data
data:
task_name: weather comfort report
instructions: |
Based on the current conditions:
- Outdoor temperature: {{ states('sensor.outdoor_temperature') }}°C
- Indoor temperature: {{ states('sensor.family_room_temperature') }}°C
- Indoor humidity: {{ states('sensor.family_room_humidity') }}%
template:
- trigger:
- trigger: homeassistant
event: start
- trigger: time_pattern
minutes: "/5" # update every 5 minutes
actions:
- action: ai_task.generate_data
data:
task_name: "People count"
alias: AI-Driven Lighting Control
description: Uses AI Task to adjust lighting based on home state
triggers:
- entity_id:
- binary_sensor.bedroom_motion
to: "on"
trigger: state
actions:
- data:
instructions: >-
alias: Count Persons from a Pic
description: Uses AI Task to analyze a camera snapshot and count persons
triggers:
- trigger: time_pattern
minutes: /5
enabled: true
- trigger: time_pattern # execute the automation every 10 seconds just to test the automation
seconds: /10
enabled: false
actions:
alias: Weather-Based Clothing Suggestion (All Data to AI)
description: Send entire hourly forecast to AI for clothing suggestion
triggers:
- trigger: state
entity_id: input_button.start_automation
to: null
actions:
- action: weather.get_forecasts
target:
entity_id: weather.forecast_home
alias: TV Off During Day Notification
description: ""
triggers:
- trigger: state
entity_id: input_boolean.tv
to: "off"
for:
minutes: 1
conditions:
- condition: time
alias: Garage Door Open At Night Notification
description: ""
triggers:
- trigger: state
entity_id:
- cover.garage_door
to: open
for:
hours: 0
minutes: 0
alias: Generate Welcome Home Message
description: Uses AI Task to create a personalized welcome message when arriving home
triggers:
- entity_id: person.kiril
to: home
trigger: state
actions:
- data:
instructions: >-
Generate a short, friendly welcome home message for {{
@peyanski
peyanski / gist:c02bb324f60cd8ee942e635955b9e9ff
Created July 23, 2025 05:06
New Automation - Kevin.yaml
alias: New automation - Kevin
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.aqara_lumi_motion_ac01_occupancy
to: "on"
id: detected
- trigger: state
entity_id:
# This is OPTIONAL, you can comment the next 2 lines below if you don't want web servre
web_server:
port: 80
i2c:
sda: 21
scl: 22
scan: true
sensor: