Skip to content

Instantly share code, notes, and snippets.

View peyanski's full-sized avatar

Kiril Peyanski peyanski

View GitHub Profile
@peyanski
peyanski / meteoalarm-groq.yaml
Last active December 5, 2026 07:44
MeteoAlarm in Home Assistant: official weather warning, optional Groq recap, and a simulated test alert
# Paste the full file into a new automation using Edit in YAML.
# Required: replace the binary_sensor entity ID in the trigger.
# Optional: set your own Groq AI Task entity ID and customize the recap prompt.
# Source-only setup: remove the entire final "- if:" action (including its
# nested lines), and leave "mode: single" at the top level.
alias: MeteoAlarm - official warning and optional Groq recap
description: Save the source warning first, then ask Groq for a short recap.
triggers:
# Starts a run only on a fresh off-to-on transition, not on attribute changes.
- trigger: state
@peyanski
peyanski / Weather-Based Clothing Suggestion (groq AI).yml
Created November 16, 2026 14:39
Weather-Based Clothing Suggestion (groq AI).yml
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
- trigger: time
at: '08:00:00'
enabled: false
actions:
@peyanski
peyanski / Shopping list - clear completed items.yaml
Last active October 23, 2026 04:38
Shopping list - clear completed items
alias: Shopping list - clear completed items
description: Removes all completed items from the shopping list every night.
triggers:
- trigger: time
at: '03:00:00'
actions:
- action: todo.remove_completed_items
target:
entity_id: todo.shopping_list
mode: single
alias: 'Shopping list: send to Kiril and Jerry by Assist'
description: Say 'send me the shopping list' to notify both phones.
triggers:
- trigger: conversation
command:
- send me the shopping list
- send the shopping list to my phone
note: |
Either phrase sends the same list to BOTH predefined phones, regardless
of who spoke or which Assist device heard it. Replace the Kiril-only
@peyanski
peyanski / Shopping list — send to Kiril's phone by Assist.yaml
Created October 22, 2026 13:22
Say 'send me the shopping list' using Assist.
alias: Shopping list — send to Kiril's phone by Assist
description: Say 'send me the shopping list' using Assist.
triggers:
- trigger: conversation
command:
- send me the shopping list
- send the shopping list to my phone
note: >
These exact Assist phrases send the native Shopping List to Kiril's
iPhone.
@peyanski
peyanski / Notify when a family-room window stays open late.yaml
Created October 18, 2026 09:38
Notify for a family-room window that stays open for five minutes at night, including a window that was already open at 22:00.
alias: Notify when a family-room window stays open late
description: >-
Notify for a family-room window that stays open for five minutes at night,
including a window that was already open at 22:00.
triggers:
- trigger: state
entity_id:
- binary_sensor.left_window
to:
- 'on'
import os
import sys
import json
import struct
import io
import urllib.request
def parse_exif(source):
out = {"has_gps": False, "latitude": 0.0, "longitude": 0.0, "timestamp": "Unknown"}
# configuration.yaml entry
shell_command:
extract_exif_data: "python3 /config/python_scripts/extract_exif.py '{{ image_file }}'"
@peyanski
peyanski / Collection image narrator automation.yaml
Created October 13, 2026 08:40
Automatically shuffles every 5 minutes or narrates when the collection image changes.
id: collection_image_narrator
alias: Collection image narrator
description: Automatically shuffles every 5 minutes or narrates when the collection image changes.
mode: restart
triggers:
- trigger: state
entity_id:
- image.media_collection
id: state_changed
- trigger: time_pattern
type: horizontal-stack
cards:
- type: picture
image_entity: image.media_collection
tap_action:
action: perform-action
perform_action: collection_image.shuffle
target:
entity_id: image.media_collection
- type: markdown