353 lines
15 KiB
YAML
353 lines
15 KiB
YAML
- alias: Amazon Mail Delivery
|
||
description: Notifies household members when an Amazon package has been delivered
|
||
and captures a snapshot from the delivery camera
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.mail_amazon_packages_delivered
|
||
above: 0
|
||
conditions: []
|
||
actions:
|
||
- action: camera.snapshot
|
||
metadata: {}
|
||
data:
|
||
filename: /config/www/amazonmail.jpg
|
||
target:
|
||
entity_id: camera.mail_amazon_delivery_camera
|
||
- parallel:
|
||
- action: notify.yourphone
|
||
metadata: {}
|
||
data:
|
||
title: Amazon Package Delivered
|
||
data:
|
||
image: http://url/local/amazonmail.jpg
|
||
message: You have {{ states('sensor.mail_amazon_packages_delivered') }} Amazon
|
||
package(s) delivered today!
|
||
- action: notify.anotherphone
|
||
metadata: {}
|
||
data:
|
||
title: Amazon Package Delivered
|
||
data:
|
||
image: http://url/local/amazonmail.jpg
|
||
message: You have {{ states('sensor.mail_amazon_packages_delivered') }} Amazon
|
||
package(s) delivered today!
|
||
mode: single
|
||
- alias: Dashboard Update Producation
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
minutes: /5
|
||
conditions: []
|
||
actions:
|
||
- action: google_generative_ai_conversation.generate_content
|
||
metadata: {}
|
||
data:
|
||
prompt: "\nYou are an hourly reporter for my home, your task is to check the\
|
||
\ status of all the entities I will give you and produce a 2 sentence form\
|
||
\ explanation of the shape my house is in, I want you to highlight any critical\
|
||
\ thing that may need attention by enclosing just that part in ** Since it\
|
||
\ is a markdown language. On some days, let your response be simple and not\
|
||
\ too long, your output will be through a markdown so you can keep that in\
|
||
\ mind for formatting- Since this is for a dashboard I want to see the report\
|
||
\ and nothing else from you like ”here is” use to make important parts bold.\
|
||
\ max of 100 characters including space and not more than that. avoid any\
|
||
\ short of punctuation including * - Make sure output is not more than 100,\
|
||
\ if not, it will not show on the dashboard. Only talk about trash if it is\
|
||
\ Saturday or Sunday - MAKE IT FUNNY.\n\nHere are some of the entities I have\n\
|
||
\nFor my main door \nThe Door’s Contact Sensor; off means it is closed, on\
|
||
\ means open\n{{ states('binary_sensor.main_door_contact_sensor_contact')}}\
|
||
\ , \nThis detects if someone is tempering with the door. Off means it is\
|
||
\ clear of tempering, On means tempering detected\n{{ states('binary_sensor.main_door_contact_sensor_tamper')}}\n\
|
||
\nFor motion Sensors in the house; Off means no motion detected - Clear ;\
|
||
\ On means motion detected\nBedroom- {{ states('binary_sensor.bedroom_motion_sensor_occupancy')}}\
|
||
\ \nKitchen- {{ states('binary_sensor.hallway_motion_sensor_occupancy')}}\
|
||
\ \nBathroom- {{ states('binary_sensor.bathroom_motion_sensor_occupancy')}}\
|
||
\ \nOffice-\n{{ states('binary_sensor.home_office_motion_sensor_occupancy')}}\
|
||
\ \nLiving room - {{ states('binary_sensor.mmwave_sensor_2e03f8_moving_target')}}\
|
||
\ or {{ states('binary_sensor.mmwave_sensor_2e03f8_presence')}}\nFor Motion\
|
||
\ Breaker Booleans - which I created and added to automations as conditions,\
|
||
\ if they are on, that means the said room will not have light come on and\
|
||
\ off automatically being triggered by motion sensor; Ideally, they are supposed\
|
||
\ to be off, I turn them on, on occasions\nBathroom- {{ states('input_boolean.motion_breaker_bathroom')}}\
|
||
\ \nBedroom- {{ states('input_boolean.motion_breaker_bedroom')}} \nKitchen-\
|
||
\ {{ states('input_boolean.motion_breaker_kitchen')}} \nOffice- {{ states('input_boolean.motion_breaker_office')}}\
|
||
\ \nOverall motion Breaker- {{ states('input_boolean.master_motion_breaker')}}\
|
||
\ \n\nFor Climate - if the any are too low or too high \nThis is for the\
|
||
\ humidity in the House\n{{ states('sensor.livingroom_temperature_humidity')}}\
|
||
\ \nThis is for the temperature in the house\n{{ states('sensor.livingroom_temperature_temperature')}}\n\
|
||
\n\nThis is for the humidity in the Server Room \n{{ states('sensor.server_temperature_humidity')}}\
|
||
\ \nThis is for the temperature in the Server Room\n{{ states('sensor.server_temperature_temperature')}}\n\
|
||
\n\nElectronics - Mainly for you to check if they are on (just on, idle or\
|
||
\ playing) or off;\nKitchen Speaker- {{ states('media_player.kitchen_speaker')}}\
|
||
\ \nBedroom Speaker- {{ states('media_player.bedroom_speaker')}} \nBathroom\
|
||
\ Speaker- {{ states('media_player.bathroom_speaker')}} \nLiving room Speaker-\
|
||
\ {{ states('media_player.nesthub7681')}} \nGym Speaker- {{ states('media_player.gymspeaker')}}\
|
||
\ \nMain Samsung TV - {{ states('media_player.samsung_tv_65_media')}}\nXbox\
|
||
\ X - {{ states('media_player.richards_xbox')}} \n\n\nBooleans\nSleeping\
|
||
\ Mode - This indicates sleeping mode is on and so we are sleeping {{ states('input_boolean.sleeping')}}\
|
||
\ \nGuest Mode - When it is on, it means we have a guest over and staying\
|
||
\ with us - {{ states('input_boolean.guest_mode')}}\nTrash Taken Out - When\
|
||
\ it is on, that means trash had been taken out for pickup {{states('input_boolean.trash_taken_out')}}\n\
|
||
\n\nBackups for Truenas\nThese are the statuses of my backups and snapshots\
|
||
\ - any alarming ones should be reported\n{{ states('sensor.truenas_replication_nashomepool_full_disk')}}\n\
|
||
{{ states('sensor.truenas_cloudsync_backup_to_mega_main')}}\n{{ states('sensor.truenas_snapshot_tasks_nashomepool')}}\n\
|
||
These entities provide the temperature of all the drives in my Truenas {{\
|
||
\ states('sensor.truenas_disks_sda')}} {{ states('sensor.truenas_disks_sdf')}}\
|
||
\ {{ states('sensor.truenas_disks_sdb')}} {{ states('sensor.truenas_disks_sdc')}}\
|
||
\ {{ states('sensor.truenas_disks_sde')}} {{ states('sensor.truenas_disks_sdd')}}\n\
|
||
\nLights - This sensor indicates the number of nights On\n {{ states('sensor.lights_on_counter')}}\n\
|
||
\nShoweer - This sensor indicates if the shower is currently running or not\
|
||
\ -- {{ states('binary_sensor.showering')}}\nSleep Mode - This sensor indicates\
|
||
\ whether we are asleep or not - on means sleeping {{ states('input_boolean.sleeping')}}\
|
||
\ input_boolean.sleeping\nTrash - These two booleans are used to track if\
|
||
\ trash it taken out or if I have been reminded if any of the two are On,\
|
||
\ that means trash is either already taken out or I have been told to take\
|
||
\ it - {{ states('input_boolean.trash_reminder_sent')}} or {{ states('input_boolean.trash_taken_out')}}\n\
|
||
\nMeTime - This boolean tracks to see if I - Richard, is either doing school\
|
||
\ work, tinkering or doing something with hardware or servers; {{ states('input_boolean.metime')}}\n\
|
||
\nTruenas Disk Health, Report if otherwise\nThe Backup Pool {{ states('binary_sensor.truenas_system_backup_healthy')}}\n\
|
||
The Boot Pool\n{{ states('binary_sensor.truenas_system_boot_pool_healthy')}}\n\
|
||
The NasHomepool\n{{ states('binary_sensor.truenas_system_nashomepool_healthy')}}\n\
|
||
\n"
|
||
response_variable: dashboardup
|
||
- action: input_text.set_value
|
||
metadata: {}
|
||
data:
|
||
value: '{{ dashboardup.text }}'
|
||
target:
|
||
entity_id: input_text.dashboard_output
|
||
mode: single
|
||
- alias: Night Routine
|
||
description: Automates the night routine triggered by a button press and hold.
|
||
triggers:
|
||
- domain: mqtt
|
||
device_id: 42f0c1e9bbda73cc4d9a5ce10b511c09
|
||
type: action
|
||
subtype: 1_single
|
||
trigger: device
|
||
alias: Single Press of 1
|
||
- trigger: state
|
||
entity_id:
|
||
- input_boolean.sleeping
|
||
to: 'on'
|
||
from: 'off'
|
||
conditions:
|
||
- condition: time
|
||
after: '20:00:00'
|
||
before: 00:00:00
|
||
actions:
|
||
- alias: Flash Lights
|
||
repeat:
|
||
count: 3
|
||
sequence:
|
||
- data:
|
||
rgb_color:
|
||
- 17
|
||
- 24
|
||
- 120
|
||
brightness_pct: 20
|
||
action: light.turn_on
|
||
target:
|
||
entity_id:
|
||
- light.sengled_bedroom_left
|
||
- light.sengled_bedroom_right
|
||
- delay: 00:00:01
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id:
|
||
- light.sengled_bedroom_right
|
||
- light.sengled_bedroom_left
|
||
- delay: 00:00:01
|
||
enabled: true
|
||
- parallel:
|
||
- action: input_boolean.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.motion_breaker_bedroom
|
||
- action: script.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: script.1744944185914
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.all_lights
|
||
state: 'on'
|
||
then:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.all_lights
|
||
- action: google_generative_ai_conversation.generate_content
|
||
metadata: {}
|
||
data:
|
||
prompt: " Your output for this will be read out by a tts, and I am looking\
|
||
\ for the\n most smoothest and human like sentences, so try to make it\
|
||
\ as easy for the\n tts as possible; make sure you keep the entities as\
|
||
\ is, since Home assistant\n will be reading them with an actual value.\
|
||
\ This message is going to be read\n to me and my wife for a goodnight\
|
||
\ message. Try your best to be very funny,\n we like almost all the characters\
|
||
\ on the Office Show, Especially Michael\n Scott and Dwight Schrute ,\
|
||
\ Kevin, and all the major characters, so you can incorporate that. We \n\
|
||
\ also Love the Show Sienfeld - use different show joke everytime\n \
|
||
\ My wife is a CNA so you can \n add funny jokes. Joke about farts too\n\
|
||
\ Do not make it too long , make it one paragraph with max of 50 words\
|
||
\ but give it your best, make it very funny and simple avoid using “*”, add\
|
||
\ punctuations that\n will add character to the tts: \n Richard and\
|
||
\ Megan,\n These are the things you need to know for tomorrow:\n\
|
||
\ \n For the weather:\n - Expect a\
|
||
\ high of {{ states('sensor.home_realfeel_temperature_max_day_1') | round\
|
||
\ }}° and a low of {{ states('sensor.home_realfeel_temperature_min_day_1')\
|
||
\ | round }}°.\n - There is a {{ states('sensor.home_thunderstorm_probability_day_1')\
|
||
\ }}% chance of a thunderstorm.\n - Wind speeds could reach up\
|
||
\ to {{ states('sensor.home_wind_speed_day_1') }} miles per hour.\n \
|
||
\ - The air quality will be {{ states('sensor.home_air_quality_day_1')\
|
||
\ }}.\n - Overall, the weather condition will be {{ states('sensor.home_condition_day_1')\
|
||
\ }}.\n \n Have a great night!"
|
||
response_variable: response
|
||
enabled: true
|
||
- action: chime_tts.say
|
||
metadata: {}
|
||
data:
|
||
message: '"{{ response.text }}"'
|
||
volume_level: 0.5
|
||
announce: true
|
||
voice: 5Q0t7uMcjvnagumLfvZi
|
||
tts_platform: tts.elevenlabs
|
||
target:
|
||
entity_id: media_player.bedroom_speaker
|
||
enabled: true
|
||
- type: turn_off
|
||
device_id: f6e62e4d38efd9f64f0fe9c02e95d002
|
||
entity_id: 02928c8875658774eed532ca8b10e9e1
|
||
domain: switch
|
||
alias: Turn off the Christmas light in the bedroom
|
||
- action: media_player.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: media_player.bedroom_speaker
|
||
- wait_for_trigger:
|
||
- trigger: state
|
||
entity_id:
|
||
- media_player.bedroom_speaker
|
||
to: 'off'
|
||
continue_on_timeout: true
|
||
timeout:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 30
|
||
milliseconds: 0
|
||
- action: script.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: script.sleeping_music
|
||
mode: single
|
||
- alias: 'Away Mode - Day '
|
||
description: 'Turns off all lights when both Person Entity and Person Entity have
|
||
been away from home for 5 minutes and sends a confirmation notification.
|
||
|
||
'
|
||
triggers:
|
||
- entity_id:
|
||
- person.yourperson
|
||
to: not_home
|
||
for:
|
||
minutes: 5
|
||
trigger: state
|
||
- entity_id:
|
||
- person.yourperson
|
||
to: not_home
|
||
for:
|
||
minutes: 5
|
||
trigger: state
|
||
conditions:
|
||
- condition: state
|
||
entity_id: person.yourperson
|
||
state: not_home
|
||
enabled: true
|
||
- condition: state
|
||
entity_id: person.yourperson
|
||
state: not_home
|
||
enabled: true
|
||
- condition: state
|
||
entity_id: input_boolean.guest_mode
|
||
state: 'off'
|
||
enabled: true
|
||
actions:
|
||
- action: script.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: script.1744944185914
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: light.all_lights
|
||
area_id:
|
||
- bathroom
|
||
- bedroom
|
||
- home_office
|
||
- kitchen
|
||
- living_room
|
||
enabled: true
|
||
- action: google_generative_ai_conversation.generate_content
|
||
metadata: {}
|
||
data:
|
||
prompt: "Create a funny, short, and witty push notification for my smart home\
|
||
\ automation. It should notify me that all lights are off, nobody is home,\
|
||
\ and everything is in order. Include jokes about the current state of the\
|
||
\ house (e.g., temperature, humidity) and make a playful reference to Seinfeld\
|
||
\ or The Office. Keep it simple with no awkward punctuation or AI-sounding\
|
||
\ phrasing. Limit to two lines MAX. For example, if it's too humid, joke like\
|
||
\ 'Are Richard or Megan training for a swimming contest?' and offer a lighthearted\
|
||
\ piece of advice. dont show options, pick one and show just the text with\
|
||
\ no punctuations esp * But be sure to confirm all lights and everything\
|
||
\ is turned off too\n This is for the humidity in the House \n\n \
|
||
\ {{ states('sensor.livingroom_temperature_humidity')}} \n\n This\
|
||
\ is for the temperature in the house\n\n {{ states('sensor.livingroom_temperature_temperature')}}\
|
||
\ \n"
|
||
response_variable: away
|
||
- action: script.new_script
|
||
metadata: {}
|
||
data:
|
||
title: Nobody Is Home!!
|
||
message: '{{ away.text }}'
|
||
mode: single
|
||
- alias: Incoming Mail
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '10:00:00'
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.mail_usps_mail
|
||
above: 0
|
||
actions:
|
||
- action: camera.snapshot
|
||
metadata: {}
|
||
data:
|
||
filename: /config/www/USPSMail.jpg
|
||
target:
|
||
entity_id:
|
||
- camera.mail_usps_camera
|
||
- parallel:
|
||
- action: notify.yourphone
|
||
metadata: {}
|
||
data:
|
||
title: 📬 Mail Today
|
||
data:
|
||
image: https://url/local/USPSMail.jpg
|
||
message: You have {{ states('sensor.mail_usps_mail') }} Mails coming in today!
|
||
- action: notify.anotherdevice
|
||
metadata: {}
|
||
data:
|
||
title: 📬 Mail Today
|
||
data:
|
||
image: https://url/local/USPSMail.jpg
|
||
message: You have {{ states('sensor.mail_usps_mail') }} Mails coming in today!
|
||
mode: single
|