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