Skip to content

Instantly share code, notes, and snippets.

View allenporter's full-sized avatar

Allen Porter allenporter

View GitHub Profile
@allenporter
allenporter / notify_agent_agenda.yaml
Last active October 1, 2024 21:19
Home Assistant Blueprint: Conversation agent Agenda Notification
---
blueprint:
name: Conversation agent Agenda Notification
description:
Conversation agent generates a notification based on the upcoming calendar
agenda, location, and weather information.
domain: automation
input:
notify_time:
name: Notification time
@allenporter
allenporter / evening_light_calendar.yaml
Created July 3, 2023 21:05
Use a calendar to manage an evening light schedule
blueprint:
name: Evening Light Calendar
description: Use a calendar for managing a light schedule. Lights are turned on according the calendar schedule, and only after dark.
domain: automation
input:
calendar_sensor:
name: Calendar Sensor
selector:
entity:
domain:
@allenporter
allenporter / switch_calendar.yaml
Created July 3, 2023 21:07
Use a calendar to control when a switch should be turned on/off
blueprint:
name: Switch on Calendar
description: Use a calendar for managing a switch schedule. Switch is turned on according the calendar schedule.
domain: automation
input:
calendar_sensor:
name: Calendar Sensor
selector:
entity:
domain:
- trigger:
- platform: homeassistant
event: start
- platform: time_pattern
hours: "/6"
action:
- service: calendar.list_events
target:
entity_id: calendar.personal
- id: '1688397301915'
alias: Upcoming Calendar Event Locations
description: Update the upcoming location helpers based on the next upcoming event.
trigger:
- platform: time
at: 06:00:00
- platform: time
at: '12:00:00'
- platform: time
at: '18:00:00'
@allenporter
allenporter / gist:587bd072908f88851e96338edbe086b0
Last active September 24, 2023 23:28
Calendar upcoming location sensor
- trigger:
- platform: homeassistant
event: start
- platform: time_pattern
hours: "/6"
action:
- service: calendar.list_events
target:
entity_id: calendar.personal
FROM mistral:latest
TEMPLATE """{{- range $index, $_ := .Messages }}
{{- if eq .Role "user" }}
{{- if and (eq (len (slice $.Messages $index)) 1) $.Tools }}[AVAILABLE_TOOLS] {{ $.Tools }}[/AVAILABLE_TOOLS]
{{- end }}[INST] {{ if and (eq (len (slice $.Messages $index)) 1) $.System }}{{ $.System }}
{{ end }}{{ .Content }}[/INST]
{{- else if eq .Role "assistant" }}
{{- if .Content }} {{ .Content }}</s>
{{- else if .ToolCalls }}[TOOL_CALLS] [