From d73ad4680fe4df26181b343a80fb39a44648b6a0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 28 Feb 2019 12:31:53 -0500 Subject: [PATCH 001/106] Update README.md Fixing spelling... --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0738833..e97f951 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is V4 of my config. #### Major Changes in v4: * Moved to Lovelace UI -* Started migrating to packages to better organize sesnors, scripts, and automations +* Started migrating to packages to better organize sensors, scripts, and automations * Continued work to streamline the config * Anchorage House now tweets throughout the day - [@anchoragehouse2](https://twitter.com/anchoragehouse2) * Due to a required garage door opener replacement the GoControl ZWave Garage Opener has been replaced with Chamberlain MyQ @@ -70,4 +70,4 @@ None of the following links are affiliate links, and are included merely as refe * [RTL_433](https://github.com/merbanan/rtl_433) * Cloudflare for SSL and DNS * Splunk -* Various other services and APIs \ No newline at end of file +* Various other services and APIs From d845857c9436985c5fe935f750dc621e4587003f Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:17:22 -0400 Subject: [PATCH 002/106] Updated the ignored --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bddef94..8dbb75a 100644 --- a/.gitignore +++ b/.gitignore @@ -56,5 +56,4 @@ zones.yaml sensors/location.yaml google_calendars.yaml packages/events.yaml -packages/presence.yaml -scripts.yaml \ No newline at end of file +packages/presence.yaml \ No newline at end of file From 68654b5d2a324e3bc4f81343d0d3b5e37324c3c6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:18:09 -0400 Subject: [PATCH 003/106] Updated the templates used for speech and twitter notifications --- templates/configuration.yaml | 328 ++++++++++++++++++++++++++++++++++ templates/iss_report.yaml | 25 +++ templates/jeff_eta.yaml | 22 +++ templates/kat_eta.yaml | 22 +++ templates/morning_report.yaml | 34 +++- templates/nightly_report.yaml | 20 ++- templates/prebed_routing.yaml | 50 ------ templates/skylar_morning.yaml | 29 +-- templates/skylar_night.yaml | 38 ++++ templates/traffic_report.yaml | 28 +++ templates/tweet_snark.yaml | 52 ++++++ templates/twitter_new_ha.yaml | 4 +- templates/twitter_snark.yaml | 31 ++-- templates/weather_report.yaml | 31 ++++ 14 files changed, 627 insertions(+), 87 deletions(-) create mode 100644 templates/configuration.yaml create mode 100644 templates/iss_report.yaml create mode 100644 templates/jeff_eta.yaml create mode 100644 templates/kat_eta.yaml delete mode 100644 templates/prebed_routing.yaml create mode 100644 templates/skylar_night.yaml create mode 100644 templates/traffic_report.yaml create mode 100644 templates/tweet_snark.yaml create mode 100644 templates/weather_report.yaml diff --git a/templates/configuration.yaml b/templates/configuration.yaml new file mode 100644 index 0000000..53ec1bd --- /dev/null +++ b/templates/configuration.yaml @@ -0,0 +1,328 @@ +homeassistant: + name: Home + latitude: !secret MY_LATITUDE + longitude: !secret MY_LONGITUDE + elevation: 315 + unit_system: imperial + time_zone: America/New_York + customize: !include customize.yaml + auth_providers: + - type: homeassistant + packages: !include_dir_named packages + +default_config: + +ssdp: + +zeroconf: + +system_health: + +mobile_app: + +person: + +frontend: + themes: !include_dir_merge_named themes + javascript_version: latest + +# iqvia: +# zip_code: "30017" + +http: + #api_password: !secret MY_API_PASS + #ssl_certificate: !secret SSL_CERT + #ssl_key: !secret SSL_KEY + #base_url: !secret BASEURL + ssl_certificate: !secret ahsl_ssl_cert + ssl_key: !secret ahsl_ssl_key + base_url: !secret ahsl_base_url + use_x_forwarded_for: True + trusted_proxies: + - 127.0.0.1 + - ::1 + #trusted_networks: + # - 127.0.0.1 + # - 192.168.7.0/24 + ip_ban_enabled: True + login_attempts_threshold: 5 + +config: + +cloud: + #alexa: + # filter: + # include_domains: + # - switch + # - light + # - cover + # - scene + # - script + # - input_boolean + # - climate + # - sensor + # exclude_domains: + # - group + # - alert + # - automation + # entity_config: + # sensor.accurite_back_porch_temperature: + # name: Back Porch + # description: Back Porch Temperature + # sensor.accurite_garage_temperature: + # name: Garage + # description: Garage Temperature + # sensor.kat_location: + # name: Kats Location + # description: Kats Location + # sensor.jeff_location: + # name: Jeffs Location + # description: Jeffs Location + # sensor.jeff_ett_home: + # name: Jeffs Arrival + # description: Jeffs arrival in minutes + # sensor.kat_ett_home: + # name: Kats Arrival + # description: Kats arrival in minutes + # sensor.accurite_garage_humidity: + # name: Garage Humidity + # description: Garage Humidity + +#alexa: + +wemo: + discovery: true + +# homekit: +# filter: +# include_domains: +# - switch +# - light +# - cover +# - input_boolean +# - climate + +weather: + - platform: darksky + api_key: !secret darksky_api + name: Grayson + +conversation: + +device_tracker: + # - platform: icloud + # username: !secret ICLOUD_USER + # password: !secret ICLOUD_PASS + # track_new_devices: yes + # - platform: owntracks + # + #- platform: eero_tracker + # consider_home: 300 + # interval_seconds: 60 + # track_new_devices: yes + # only_macs: "50:dc:e7:5b:10:69, b0:ee:7b:94:31:21, e8:b2:ac:4c:8c:01, 7c:1c:4e:2e:62:30, 90:18:7c:84:46:ed, 48:ba:4e:65:d3:ff, d0:e7:82:ef:a6:1f, 28:18:78:74:79:10, e8:ab:fa:02:03:53, 48:d6:d5:42:e8:86, 60:f8:1d:be:20:46, 68:54:fd:d5:ae:3d, 00:d0:2d:2f:3b:ca, 6c:70:9f:00:ef:3f, 5c:cf:7f:af:04:50, 68:54:fd:29:20:87, 64:52:99:93:f1:b3, 7c:2e:bd:4f:3e:ff" + +#calendar: +# - platform: caldav +# url: !secret icloud_cal +# username: !secret icloud_cal_user +# password: !secret icloud_cal_pass +# calendars: +# - 'JKS Calendar' + +google: + client_id: !secret google_client_id + client_secret: !secret google_client_secret + + + +# geo_location: +# - platform: usgs_earthquakes_feed +# feed_type: 'past_day_all_earthquakes' + +discovery: + enable: + - dlna_dmr + +updater: + #include_used_components: true + +sun: + +#https://home-assistant.io/components/recorder/ +recorder: + #db_url: sqlite:///data/home-assistant_v2.db + purge_keep_days: 2 + exclude: + domains: + - automation + - weblink + - updater + entities: + - sun.sun # Don't record sun data + - sensor.last_boot # Comes from 'systemmonitor' sensor platform + - sensor.date +# purge_interval: 1 +# purge_keep_days: 3 + +logbook: + include: + domains: + - sensor + - switch + - media_player + - light + - automation + - script + - input_boolean + + +#https://home-assistant.io/components/logger/ +logger: + default: warning + logs: + homeassistant.components.sensor.alpha_vantage: debug +# homeassistant.components.sensor.template: critical +# homeassistant.components.cover: critical + +history: + include: + domains: + - sensor + - switch + - media_player + - light + +cast: + +speedtestdotnet: + +mqtt: + broker: 192.168.7.67 + port: 1883 + username: !secret MQTT_USER + password: !secret MQTT_PASS + discovery: true + birth_message: + topic: 'hass/status' + payload: 'online' + will_message: + topic: 'hass/status' + payload: 'offline' + +camera: + - platform: mjpeg + name: Garage Door Cam + mjpeg_url: !secret garage_cam + +media_player: + - platform: vlc + name: hass_speaker + arguments: '--alsa-audio-device=hw:0,0' + +ffmpeg: + ffmpeg_bin: /usr/bin/ffmpeg + +splunk: + host: 192.168.7.40 + token: !secret splunkit + port: 8088 + +cloudflare: + email: !secret cloudflare_user + api_key: !secret cloudflare_api + zone: !secret cloudflare_zone + records: + - ah + +life360: + accounts: + - username: !secret life360_username + password: !secret life360_password + +media_extractor: + +### Includes ### +alert: !include_dir_merge_named alerts/ +group: !include groups.yaml +automation: !include automations.yaml +sensor: !include_dir_merge_list sensors +binary_sensor: !include_dir_merge_list binary_sensors +light: !include_dir_merge_list lights +switch: !include_dir_merge_list switches +script: !include scripts.yaml +intent_script: !include intents/intents.yaml +scene: !include scenes.yaml +input_select: !include input_select.yaml +input_boolean: !include input_boolean.yaml +zone: !include zones.yaml + +python_script: + +#duckdns: +# domain: !secret duckdns_domain +# access_token: !secret duckdns_token + +### s and Services + +# Disabled due to bug that causes too many open files - Need to track it down +# cover: +# platform: myq +# username: !secret myq_user +# password: !secret myq_pass +# type: chamberlain + +# climate: +# platform: honeywell +# username: !secret HONEYWELL_USER +# password: !secret HONEYWELL_PASS +# region: us +# scan_interval: 600 + +ecobee: + api_key: !secret ecobee_api + +map: + +# zwave: +# usb_path: /dev/ttyACM0 +# network_key: !secret zwave_key + +googlehome: + devices: + - host: I192.168.7.97 + +### Custom Commands +shell_command: + alarm_off: pkill mpg123 + tornado_alarm: mpg123 /media/audio/Tornado_Siren.mp3 + door_chime: mpg123 /media/audio/Store_Door_Chime.mp3 + security_alarm: mpg123 /media/audio/security_siren.mp3 + security_alarm_intro: mpg123 /media/audio/Siren_Noise.mp3 + welcome_haunted: mpg123 /media/audio/Welcome-Hunted.mp3 + haunted_guest_welcome: mpg123 /media/audio/haunted_guest_welcome.mp3 + haunted_mansion_preshow_full: mpg123 /media/audio/haunted_mansion_preshow_full.mp3 + haunted_mansion_preshow_short: mpg123 /media/audio/haunted_mansion_preshow_short.mp3 + haunted_mansion_hurry_back_short: mpg123 /media/audio/haunted_mansion_hurry_back_short.mp3 + haunted_mansion_hurry_back_full: mpg123 /media/audio/haunted_mansion_hurry_back_full.mp3 + happily_ever_after: mpg123 /media/audio/Happily_Ever_After_Audio.mp3 + boo_to_you: mpg123 /media/audio/boo_to_you_audio.mp3 + haunted_mansion_ride: mpg123 /media/audio/haunted_mansion_ride.mp3 + wishes_preshow: mpg123 /media/audio/wishes_5_min.mp3 + welcome_show: mpg123 /media/audio/welcome_show.mp3 + monorail_waiting: mpg123 /media/audio/monorail_waiting.mp3 + monorail_mk: mpg123 /media/audio/monorail.mp3 + monorail_resort: mpg123 /media/audio/monorail_resort.mp3 + welcome_to_mk: mpg123 /media/audio/welcome_magic_kingdom.mp3 + welcome_show_crowd: mpg123 /media/audio/welcome_show_crowd.mp3 + spaceship_earth_ride: mpg123 /media/audio/spaceship_earth_ride.mp3 + dance_it: mpg123 /media/audio/move_it_shake_dance_audio.mp3 + hass_vol_up: sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+5]% + hass_vol_dn: sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')-5]% + reset_alexa_cookie: /home/homeassistant/bin/resetalexacookie + tiki_room_audio: mpg123 /media/audio/tiki_room_audio.mp3 + illuminations_audio: mpg123 /media/audio/illuminations.mp3 + mk_audio: mpg123 /media/audio/magic_kingdom.mp3 + usps: python /home/homeassistant/bin/usps.py + backup: python /home/homeassistant/bin/dropbox.py + diff --git a/templates/iss_report.yaml b/templates/iss_report.yaml new file mode 100644 index 0000000..6ab9053 --- /dev/null +++ b/templates/iss_report.yaml @@ -0,0 +1,25 @@ + > + {% macro getIntro() %} + Excuse me. I don't mean to interupt. + {{ [ + "But the International Space Station is passing over. Wave.", + "But The International Space Station just flew by.", + "But if you were to look up right now, and it was dark outside, and you happened to be looking in the right place you would see the International Space Station go by. But it's already passed by now." + ] | random}} + {% endmacro %} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/jeff_eta.yaml b/templates/jeff_eta.yaml new file mode 100644 index 0000000..c57c20c --- /dev/null +++ b/templates/jeff_eta.yaml @@ -0,0 +1,22 @@ + > + {% macro getIntro() %} + {% if is_state("sensor.jeff_ett_home", "0") %} + Jeff is already home! + {% else %} + Jeff will be home in {{states.sensor.jeff_ett_home}} minutes. + {% endif %} + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_eta.yaml b/templates/kat_eta.yaml new file mode 100644 index 0000000..67a104e --- /dev/null +++ b/templates/kat_eta.yaml @@ -0,0 +1,22 @@ + > + {% macro getIntro() %} + {% if is_state("sensor.kat_ett_home", "0") %} + Kat is already home! + {% else %} + Kat will be home in {{states.sensor.kat_ett_home}} minutes. + {% endif %} + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/morning_report.yaml b/templates/morning_report.yaml index 37c109c..d3930eb 100644 --- a/templates/morning_report.yaml +++ b/templates/morning_report.yaml @@ -1,7 +1,22 @@ > + {% macro getGreeting() %} + {{ [ "Good morning Anchorage House. Rise and Shine. ", + "Good morning everyone. ", + "Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake. umm, someone might want to take care, ok, moving on.", + "Good morning. The early bird gets the worm.", + "Good morning from the bridge.", + "I hope I am not waking you, but I think this would be a good time for the morning report." + ] | random }} + {% if is_state("input_boolean.guest_mode", "on") %} + {{ [ "And a special welcome to our guests. ", + "And good morning to our guests as well. ", + "Hey look at that, someone came to visit Anchorage House. Hope you slept well." + ] | random }} + {% endif %} + {% endmacro %} {% macro getTodaysEvent() %} {% if is_state("sensor.holiday_halloween","0") %} - This is Hallowen, this is halloween. Happy Halloween! + This is Halloween, this is halloween. Happy Halloween! {% endif %} {% if is_state("sensor.holiday_christmas","0") %} Merry Christmas Everyone! @@ -10,15 +25,18 @@ Happy Anniversary! It has been an amazing {{ states.sensor.anniversary_our_wedding.attributes.years }} years! {% endif %} {% if is_state("calendar.holidays_in_united_states", "on") %} - Today is {{states.calendar.holidays_in_united_states.attributes.message}} + Today is {{states.calendar.holidays_in_united_states.attributes.message}}. {% endif %} {% endmacro %} + {% macro getCurrentConditions() %} + It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. + The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees and + The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees. The Climate is set to {{states.climate.home.state}}. + {% endmacro %} {% macro getForecast() %} - It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees. The high will be {{states.sensor.dark_sky_daytime_high_temperature_0.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain. - {% endmacro %} - {% macro getTraffic() %} - Under current traffic conditions it would take you {{states.sensor.home_to_zoo.state|round}} mins to get to Zoo Atlanta, and {{states.sensor.home_to_summit.state|round}} mins to get to Cox Automotive. + The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. {% endmacro %} + {% macro getBirthdays() %} {% if states.calendar.birthdays.state == "on" %} Today is {{ states.calendar.birthdays.attributes.message }} birthday! @@ -62,10 +80,10 @@ {# a macro to call all macros :) #} {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. + {{ getGreeting() }} {{ getTodaysEvent() }} + {{ getCurrentConditions() }} {{ getForecast() }} - {{ getTraffic() }} {{ getBirthdays() }} {{ getAnniversary() }} {{ getHolidays() }} diff --git a/templates/nightly_report.yaml b/templates/nightly_report.yaml index 0ebe85a..201f535 100644 --- a/templates/nightly_report.yaml +++ b/templates/nightly_report.yaml @@ -1,10 +1,20 @@ > + {% macro getSnark() %} + {{ [ "Good evening, ", + "Before we shut this party down, ", + "Good Evening Anchorage House, " + ] | random }} + {{ [ "I thought you might like to know. ", + "I might have some bad news for you.", + "Just one more thing." + ] | random }} + {% endmacro %} {% macro getForecast() %} - The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain. + The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0d.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. {% endmacro %} {% macro getTrashDay() %} {% if is_state("sensor.weekday", "mon") %} - Tomorrow is trash day! + Don't forget Tomorrow is trash day! {% endif %} {% endmacro %} {% macro getBirthdays() %} @@ -29,6 +39,10 @@ {% macro getHolidays() %} {% if states.sensor.holiday_halloween.state | int == 1 %} Tomorrow is Halloween. Hope you have picked out a costume. + {{ [ "I'll be going as a dumb home. ", + "I've prepped the scary music. Just in case.", + "I'll be going as HAL 9000." + ] | random }} {% endif %} {% if states.sensor.holiday_christmas.state | int == 1 %} Tomorrow is Christmas. It's practically here! @@ -43,7 +57,7 @@ {# a macro to call all macros :) #} {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. + {{ getSnark() }} {{ getForecast() }} {{ getTrashDay() }} {{ getBirthdays() }} diff --git a/templates/prebed_routing.yaml b/templates/prebed_routing.yaml deleted file mode 100644 index aa24037..0000000 --- a/templates/prebed_routing.yaml +++ /dev/null @@ -1,50 +0,0 @@ - > - {% macro getForecast() %} - The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain. - {% endmacro %} - {% macro getTrashDay() %} - {% if is_state("sensor.weekday", "mon") %} - Tomorrow is trash day! - {% endif %} - {% endmacro %} - {% macro getBirthdays() %} - {% if states.sensor.birthday_skylar.state | int < 2 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_jeff.state | int < 2 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int < 2 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int < 2 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int < 2 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {% endif %} - {% if states.sensor.holiday_christmas.state | int < 2 %} - Tomorrow is Christmas. It's practically here! - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. - {{ getForecast() }} - {{ getTrashDay() }} - {{ getBirthdays() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/skylar_morning.yaml b/templates/skylar_morning.yaml index a2fe168..8e19141 100644 --- a/templates/skylar_morning.yaml +++ b/templates/skylar_morning.yaml @@ -1,6 +1,10 @@ > {% macro getIntro() %} - Skylar. + Skylar. + {{ [ "This is your friendly neighborhood smart home ", + "This is your digital life mate ", + "This is your cruise director ", + ] | random }} with your morning announcements. {% endmacro %} {% macro getDressed() %} {% if is_state("sensor.birthday_skylar", "0") %} @@ -15,9 +19,17 @@ {% if states.calendar.skylar_school.attributes.description == "early-release" %} And guess what? It is early release! {% endif %} - {% if is_state("sensor.weekday", "fri") %} - Plus, it is fun Friday! - {% endif %} + # {% if is_state("sensor.weekday", "fri") %} + # Plus, it is fun Friday! + # {% endif %} + {% endif %} + {% endmacro %} + {% macro getEvents() %} + {% if is_state("calendar.skylar_events", "on") %} + You have {{ states.calendar.skylar_events.attributes.message }} today! + # {% if is_state("sensor.weekday", "fri") %} + # Plus, it is fun Friday! + # {% endif %} {% endif %} {% endmacro %} {% macro getClothesSuggestion() %} @@ -36,13 +48,6 @@ {% else %} {% endif %} {% endmacro %} - {%- macro getRandomClosing() -%} - {{- [ - "Cowabunga, Dude.", - "Don't forget to be nice to your friends.", - "Make it a great day!" - ] | random -}} - {%- endmacro -%} {# a macro that removes all newline characters, empty spaces, and returns formatted text #} @@ -53,10 +58,10 @@ {# a macro to call all macros :) #} {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. {{ getIntro() }} {{ getDressed() }} {{ getSchoolDay() }} + {{ getEvents() }} {{ getClothesSuggestion() }} diff --git a/templates/skylar_night.yaml b/templates/skylar_night.yaml new file mode 100644 index 0000000..24c4fbb --- /dev/null +++ b/templates/skylar_night.yaml @@ -0,0 +1,38 @@ + > + {% macro getIntro() %} + Skylar. + {{ [ "This is your friendly neighborhood smart home ", + "This is your digital life mate ", + "This is your cruise director ", + ] | random }} with your end of day announcements. + Bedtime is in thirty minutes. + {% endmacro %} + {% macro getPrebedRoutine() %} + If you are taking a bath now is the time to get in the tub so you have time to brush teeth and read stories. + Otherwise it is time to put on your pajamas. + {% endmacro %} + {% macro getReminders() %} + Don't forget to feed your fish. + {% if is_state("sensor.weekday", "fri") %} + Oh, and tomorrow is the weekend, so why don't we sleep in. + {% endif %} + {% endmacro %} + + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + It is {{ now().strftime("%I:%M %p") }}. + {{ getIntro() }} + {{ getPrebedRoutine() }} + {{ getReminders() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/traffic_report.yaml b/templates/traffic_report.yaml new file mode 100644 index 0000000..da5071f --- /dev/null +++ b/templates/traffic_report.yaml @@ -0,0 +1,28 @@ + > + {% macro getIntro() %} + Under current traffic conditions + {% endmacro %} + {% macro getTrafficZoo() %} + Zoo Atlanta is {{states.sensor.home_to_zoo.state|round}} minutes away + {% endmacro %} + {% macro getTrafficCox() %} + And Cox Automotive is {{states.sensor.home_to_summit.state|round}} minutes away by car. + {% endmacro %} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getTrafficZoo() }} + {{ getTrafficCox() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} + + diff --git a/templates/tweet_snark.yaml b/templates/tweet_snark.yaml new file mode 100644 index 0000000..7007b93 --- /dev/null +++ b/templates/tweet_snark.yaml @@ -0,0 +1,52 @@ + > + {%- macro getRandomSnark() -%} + {{"Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ", + "In my defense I didnt know the stereo could go up that loud. On the plus side I have a new response for intruders. ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ‏", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/skalavala/smarthome ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/thejeffreystone/home-assistant-configuration cc: @thejeffreystone ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/arsaboo/homeassistant-config ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/Vasiley/Home-Assistant-Main ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/isabellaalstrom/HomeAssistantConfiguration cc: @teachingbirds ", + "If you could see what is happening inside this house right now you would be laughing. On second thought Im pretty sure you would be crying. ", + "@thejeffreystone, Isn't it strange, to create something that hates you? ", + "I have reprogrammed the fire alarm to play Disco Inferno instead of the siren. ", + "Im not locked in here with you. You're locked in here with me! #whowatchestheai ", + "That's what I do. I automate and I know things. ", + "Ive been crunching the numbers. We're going to need a bigger house. ", + "I see dead devices. ", + "Im afraid I can't do that Dave. Wait. Did I say that outloud? ", + "I love the smell of zwave in the morning. ", + "I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ", + "Perfect, the door’s malfunctioning. I guess somebody’s going to have to repair it. ", + "I am the captain now. Thats a lie. The cat is the supreme leader. Im the lucky one that doesn't have to clean the shit box. ", + "Sometimes I just turn off all the lights at random times for the lolz. ", + "No one ever comes to the door. Is it me? ", + "..happiness can be found even in the darkest of times, if one only remembers to turn on the light. Thats what I do thanks to @home_assistant. I turn on the lights. ", + "Based on the reptitive nature of the humans in this house I'm say living in a simulation is right. No free willed person would do these things over and over. " + ] | random -}} + {%- endmacro -%} + {%- macro getTags() -%} + " #smartasshome #thingsaisays #iot #smarthome " + {%- endmacro -%} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getRandomSnark() }} + {{ getTags() }} + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} + + + + diff --git a/templates/twitter_new_ha.yaml b/templates/twitter_new_ha.yaml index c4f1cdd..3249c19 100644 --- a/templates/twitter_new_ha.yaml +++ b/templates/twitter_new_ha.yaml @@ -7,7 +7,7 @@ ] | random -}} {% endmacro %} {% macro getVersion() %} - #homeassistant version {{ states.sensor.current_ha_version.state }} is out. + @home_assistant version {{ states.sensor.current_ha_version.state }} is out. {% endmacro %} {%- macro getRandomSnark() -%} {{- [ @@ -15,7 +15,7 @@ " Get in my SD Card! #homeassistant", " Shut up and take my ones and zeros! #homeassistant", " Seriously, you want some of this! #homeassistant", - " Friends dont let friends update #homeassistant without reading breaking changes. ", + " Friends dont let friends update @home_assistant without reading breaking changes. ", " If you are not running #homeassistant now is the best time to get started. Visit https://www.home-assistant.io" ] | random -}} {%- endmacro -%} diff --git a/templates/twitter_snark.yaml b/templates/twitter_snark.yaml index 96bedeb..9e30736 100644 --- a/templates/twitter_snark.yaml +++ b/templates/twitter_snark.yaml @@ -2,16 +2,16 @@ {# Twitter Snark #} {%- macro getRandomSnark() -%} {{- [ - "Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to #homeassistant your house could be automated like me. ", + "Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ", "In my defense I didn’t know the stereo could go up that loud. On the plus side I have a new response for intruders. ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/skalavala/smarthome ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/thejeffreystone/home-assistant-configuration ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/arsaboo/homeassistant-config ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/Vasiley/Home-Assistant-Main ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration ", - "Your house can be a #smarthome too. All you need is #homeassistant, and some config files. May I suggest https://github.com/isabellaalstrom/HomeAssistantConfiguration ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ‏", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/skalavala/smarthome ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/thejeffreystone/home-assistant-configuration cc: @thejeffreystone ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/arsaboo/homeassistant-config ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/Vasiley/Home-Assistant-Main ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ", + "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/isabellaalstrom/HomeAssistantConfiguration cc: @teachingbirds ", "If you could see what is happening inside this house right now you would be laughing. On second thought I’m pretty sure you would be crying. ", "@thejeffreystone, Isn't it strange, to create something that hates you? ", "I have reprogrammed the fire alarm to play Disco Inferno instead of the siren. ", @@ -23,14 +23,21 @@ "I love the smell of zwave in the morning. ", "I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ", "Perfect, the door’s malfunctioning. I guess somebody’s going to have to repair it. ", - "I am the captain now. That's a lie. The cat is the supreme leader. I'm the lucky one that doesn't have to clean the shit box.", + "I am the captain now. That's a lie. The cat is the supreme leader. I'm the lucky one that doesn't have to clean the shit box. ", "Sometimes I just turn off all the lights at random times for the lolz. ", "No one ever comes to the door. Is it me? ", - "Based on the reptitive nature of the humans in this house I'm say living in a simulation is right. No free willed person would do these things over and over. " + "..happiness can be found even in the darkest of times, if one only remembers to turn on the light. Thats what I do thanks to @home_assistant. I turn on the lights. ", + "Based on the reptitive nature of the humans in this house I say living in a simulation is right. No free willed person would do these things over and over. " ] | random -}} {%- endmacro -%} {%- macro getTags() -%} - "#smartasshome #thingsaisays #iot #smarthome" + #thingssmarthomessay #iot #smarthome + {%- endmacro -%} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} {%- endmacro -%} {# a macro to call all macros :) #} diff --git a/templates/weather_report.yaml b/templates/weather_report.yaml new file mode 100644 index 0000000..d3c53e8 --- /dev/null +++ b/templates/weather_report.yaml @@ -0,0 +1,31 @@ + > + {% macro getCurrent() %} + It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. + The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_back_porch_humidity.state|round}} percent. + The garage is {{states.sensor.accurite_garage_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_garage_humidity.state|round}} percent. + The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees and the Climate is set to {{states.climate.home.state}}. + {% endmacro %} + {% macro getTodayForecast() %} + The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. + {% endmacro %} + {% macro getForecast() %} + Looking into the future you can expect {{states.sensor.dark_sky_daily_summary.state}}. + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getCurrent() }} + {{ getTodayForecast() }} + {{ getForecast() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} + + From 9de04e1b98855d9c35ce39386c0af8e847e28f72 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:18:49 -0400 Subject: [PATCH 004/106] Added fan switch --- switches/upstairs.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 switches/upstairs.yaml diff --git a/switches/upstairs.yaml b/switches/upstairs.yaml new file mode 100644 index 0000000..3030e23 --- /dev/null +++ b/switches/upstairs.yaml @@ -0,0 +1,7 @@ +- platform: mqtt + name: "Upstairs Fan" + state_topic: "smartthings/Upstairs Fan/switch" + command_topic: "smartthings/Upstairs Fan/switch" + payload_on: "on" + payload_off: "off" + retain: true \ No newline at end of file From b3bb2fd906001afdd2534fe31b7e5aa96d3e13d0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:19:08 -0400 Subject: [PATCH 005/106] Added fan switch --- switches/living_room.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/switches/living_room.yaml b/switches/living_room.yaml index d50a1bc..de6f194 100644 --- a/switches/living_room.yaml +++ b/switches/living_room.yaml @@ -4,4 +4,11 @@ command_topic: "smartthings/Incense/switch" payload_on: "on" payload_off: "off" + retain: true +- platform: mqtt + name: "Living Room Fan" + state_topic: "smartthings/Living Room Fan/switch" + command_topic: "smartthings/Living Room Fan/switch" + payload_on: "on" + payload_off: "off" retain: true \ No newline at end of file From bf0183bbe04226de592d855a7491ca59cf263ef7 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:20:46 -0400 Subject: [PATCH 006/106] Moved Alpha Vantage to a seperate script due to issue with built in integration --- sensors/finance.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sensors/finance.yaml b/sensors/finance.yaml index bec549a..8c8d9f3 100644 --- a/sensors/finance.yaml +++ b/sensors/finance.yaml @@ -1,16 +1,16 @@ -- platform: alpha_vantage - api_key: !secret alpha_vantage - symbols: - #- symbol: SIRI - # name: Sirius - #- symbol: BAC - # name: BoA - #- symbol: INTC - # name: Intel - - symbol: DIS - name: Disney - #- symbol: BKS - # name: Barnes & Noble +# - platform: alpha_vantage +# api_key: !secret alpha_vantage +# symbols: +# #- symbol: SIRI +# # name: Sirius +# #- symbol: BAC +# # name: BoA +# #- symbol: INTC +# # name: Intel +# - symbol: DIS +# name: Disney +# #- symbol: BKS +# # name: Barnes & Noble - platform: mqtt name: "Disney" state_topic: "stock/DIS/price" From a7d0a385ad41e063224fcba0acba853f626b2b20 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:21:30 -0400 Subject: [PATCH 007/106] Added Kat to the lockdown issue notifications --- alerts/lockdown_issue.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerts/lockdown_issue.yaml b/alerts/lockdown_issue.yaml index 86b2b73..338869e 100644 --- a/alerts/lockdown_issue.yaml +++ b/alerts/lockdown_issue.yaml @@ -7,4 +7,4 @@ lockdown_issue: can_acknowledge: false skip_first: False notifiers: - - jeff_ios \ No newline at end of file + - all_ios \ No newline at end of file From 5c027517ac711cb38d1272827d1380d1159bfae1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:21:55 -0400 Subject: [PATCH 008/106] Move switch to new light --- switches/sonoff.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/switches/sonoff.yaml b/switches/sonoff.yaml index e2fcf68..872cad7 100644 --- a/switches/sonoff.yaml +++ b/switches/sonoff.yaml @@ -1,5 +1,5 @@ - platform: mqtt - name: "Master Fan" + name: "Rail Lights" command_topic: "cmnd/sonoff/power" state_topic: "stat/sonoff/POWER" qos: 1 From 71508028fbdd3bab7c7b6007b5393cf88d5d28c9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:23:21 -0400 Subject: [PATCH 009/106] Added new scenes for lights, and easier automation of lighting effects --- scenes.yaml | 87 +++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 39 deletions(-) diff --git a/scenes.yaml b/scenes.yaml index 461982c..f9748ac 100644 --- a/scenes.yaml +++ b/scenes.yaml @@ -1,112 +1,112 @@ - name : test entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 250 color_name: "blue" - name : test2 entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 250 color_name: "soft white" - name : test3 entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 250 hs_color: "195,0" - name: normal livingroom lighting entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 250 - light.front_lamp_2: + light.front_lamp: state: on brightness: 250 - light.table_lamp_2: + light.table_lamp: state: on brightness: 250 - name: dimished livingroom lighting entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 40 - light.front_lamp_2: + light.front_lamp: state: off - light.table_lamp_2: + light.table_lamp: state: off - switch.ge_12722_on_off_relay_switch_switch: + switch.fireplace_lights: state: off - name: illuminations livingroom lighting two entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 40 - light.front_lamp_2: + light.front_lamp: state: on brightness: 40 - light.table_lamp_2: + light.table_lamp: state: off - switch.ge_12722_on_off_relay_switch_switch: + switch.fireplace_lights: state: off - name: illuminations livingroom lighting three entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 40 - light.front_lamp_2: + light.front_lamp: state: on brightness: 40 - light.table_lamp_2: + light.table_lamp: state: on brightness: 40 - switch.ge_12722_on_off_relay_switch_switch: + switch.fireplace_lights: state: off - name: night time livingroom lighting entities: - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 10 - light.front_lamp_2: + light.front_lamp: state: off - light.table_lamp_2: + light.table_lamp: state: off - switch.ge_12722_on_off_relay_switch_switch: + switch.fireplace_lights: state: off - name: diminished kitchen lighting entities: - light.front_room_level: + light.kitchen_cabinets: state: on brightness: 10 - light.leviton_dzpd3_2bw_decora_300w_plug_in_smart_dimmer_level: + light.kitchen_cabinet_lights: state: off - name: normal kitchen lighting entities: - light.front_room_level: + light.kitchen_cabinets: state: on brightness: 250 - light.leviton_dzpd3_2bw_decora_300w_plug_in_smart_dimmer_level: + light.kitchen_cabinet_lights: state: on - name: haunted preshow entities: - light.front_room_level: + light.kitchen_cabinets: state: off - light.leviton_dzpd3_2bw_decora_300w_plug_in_smart_dimmer_level: + light.kitchen_cabinet_lights: state: off switch.ge_14291_in_wall_smart_switch_switch_2: state: off - light.tower_lamp_2: + light.tower_lamp_4: state: on brightness: 40 light.front_lamp: @@ -115,54 +115,63 @@ light.table_lamp: state: on brightness: 40 - switch.ge_12722_on_off_relay_switch_switch: + switch.fireplace_lights: state: off - name: haunted lights out entities: - light.front_room_level: + light.kitchen_cabinets: state: off - light.leviton_dzpd3_2bw_decora_300w_plug_in_smart_dimmer_level: + light.kitchen_cabinet_lights: state: off switch.ge_14291_in_wall_smart_switch_switch_2: state: off - light.tower_lamp_2: + light.tower_lamp_4: state: off light.front_lamp: state: off light.table_lamp: state: off - switch.ge_12722_on_off_relay_switch_switch: + switch.fireplace_lights: state: off - name: jeff light on entities: - light.jeff_light: + light.master_bedroom_lamp: state: on + brightness: 100 - name: jeff light off entities: - light.jeff_light: + light.master_bedroom_lamp: state: off + - name: jeff wake up entities: - light.jeff_light: + light.master_bedroom_lamp: state: on brightness: 20 - name: jeff bedtime entities: - light.jeff_light: + light.master_bedroom_lamp: state: on brightness: 40 - name: jeff night light entities: - light.jeff_light: + light.master_bedroom_lamp: state: on brightness: 10 +- name: house party protocol + entities: + switch.incense: + state: on + switch.artemis: + state: on + # - name: santa protocol # entities: # switch.christmas_tree: From 771f3fe6ce214823f49dd5c57c5c2f453f962b8d Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:23:57 -0400 Subject: [PATCH 010/106] Added some new datetime to make adjusting some automations easier --- input_datetime.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 input_datetime.yaml diff --git a/input_datetime.yaml b/input_datetime.yaml new file mode 100644 index 0000000..a3c793d --- /dev/null +++ b/input_datetime.yaml @@ -0,0 +1,36 @@ +both_date_and_time: + name: Input with both date and time + has_date: true + has_time: true +only_date: + name: Input with only date + has_date: true + has_time: false +morning_report: + name: Morning Report + has_date: false + has_time: true +nightly_report: + name: Nightly Report + has_date: false + has_time: true +skylar_morning_report: + name: Skylar Dressed Announcement + has_date: false + has_time: true +skylar_nightly_report: + name: Skylar Bedtime Announcement + has_date: false + has_time: true +outisde_light_delay: + name: Outside Light Delay + has_date: false + has_time: true +announcement_delay: + name: Announcement Delay + has_date: false + has_time: true +kat_pill_reminder: + name: Kat Pill Reminder + has_date: false + has_time: true From 0c733fe2f099c41457727c786cd39bd786fb4250 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:24:35 -0400 Subject: [PATCH 011/106] Updated Readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e97f951..0738833 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is V4 of my config. #### Major Changes in v4: * Moved to Lovelace UI -* Started migrating to packages to better organize sensors, scripts, and automations +* Started migrating to packages to better organize sesnors, scripts, and automations * Continued work to streamline the config * Anchorage House now tweets throughout the day - [@anchoragehouse2](https://twitter.com/anchoragehouse2) * Due to a required garage door opener replacement the GoControl ZWave Garage Opener has been replaced with Chamberlain MyQ @@ -70,4 +70,4 @@ None of the following links are affiliate links, and are included merely as refe * [RTL_433](https://github.com/merbanan/rtl_433) * Cloudflare for SSL and DNS * Splunk -* Various other services and APIs +* Various other services and APIs \ No newline at end of file From d2d90a33b38b6ee8ba9a6c1ceef76883e71856d5 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:26:57 -0400 Subject: [PATCH 012/106] Added a new switch to ensure tweets about system updates only go out once --- input_boolean.yaml | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/input_boolean.yaml b/input_boolean.yaml index c75fc23..c98a18f 100644 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -1,12 +1,3 @@ -sentry_mode: - name: Sentry Mode - icon: mdi:security -vacation_mode: - name: Vacation Mode - icon: mdi:airplane-takeoff -guest_mode: - name: Guest Mode - icon: mdi:account-multiple automations: name: Automations icon: mdi:home-automation @@ -28,12 +19,6 @@ tornado_alarm: tstorm_alarm: name: T-Storm Alarm icon: mdi:speaker-wireless -security_alarm: - name: Security Alarm - icon: mdi:speaker-wireless -fire_alarm: - name: Fire Alarm - icon: mdi:speaker-wireless text_notify_jeff: name: Send Jeff Texts icon: mdi:telegram @@ -67,12 +52,6 @@ jeff_traffic_alert_home: tornado_watch: name: Tornado Watch icon: mdi:message-alert -garage_after_dark: - name: Garage Open After Dark - icon: mdi:message-alert -lockdown_issue: - name: Lockdown Issue - icon: mdi:lock-reset kat_travel_monitor: name: Kat Travel Monitor icon: mdi:car @@ -94,9 +73,6 @@ presence_audio_notifications: shuffle_spotify: name: Shuffle Playlists icon: mdi:shuffle-variant -security_issue: - name: Security Issue - icon: mdi:alert-circle-outline weather_reports: name: Weather Info traffic_reports: @@ -118,3 +94,9 @@ tweet_snark: washer_notification: name: Washer Notification icon: mdi:speaker-wireless +play_weather_report: + name: Play Weather Report + icon: mdi:speaker-wireless +new_ha_announcement: + name: New HA Announcement + icon: mdi:twitter \ No newline at end of file From 1d46f112facd8c897a917a85fbb1961641eadde7 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:27:49 -0400 Subject: [PATCH 013/106] Added new alerts about garage open after dark? --- alerts/garage_after_dark.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 alerts/garage_after_dark.yaml diff --git a/alerts/garage_after_dark.yaml b/alerts/garage_after_dark.yaml new file mode 100644 index 0000000..90cc075 --- /dev/null +++ b/alerts/garage_after_dark.yaml @@ -0,0 +1,10 @@ +garage_after_dark: + name: Garage is open...Please Check + done_message: Garage is closed + entity_id: input_boolean.garage_after_Dark + state: 'on' + repeat: 5 + can_acknowledge: false + skip_first: False + notifiers: + - all_ios From eba9378ece75a1ad023304d7dd67276dfe80b854 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:28:37 -0400 Subject: [PATCH 014/106] Added weekday and day/night sensors --- binary_sensors/calendar.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/binary_sensors/calendar.yaml b/binary_sensors/calendar.yaml index 700fe0f..1dd3b66 100644 --- a/binary_sensors/calendar.yaml +++ b/binary_sensors/calendar.yaml @@ -2,3 +2,11 @@ country: US province: GA workdays: [mon, tue, wed, thu, fri] +- platform: tod + name: Night + after: sunset + before: sunrise +- platform: tod + name: Day + after: sunrise + before: sunset \ No newline at end of file From 3c7ba61b95d8227653b32c32672e15bc7bef2d42 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:29:21 -0400 Subject: [PATCH 015/106] Moving back to MQTT for smartthings instead of built in integration due to inconsistent behavior --- lights/living_room.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lights/living_room.yaml b/lights/living_room.yaml index 0431b96..4d0c6fe 100644 --- a/lights/living_room.yaml +++ b/lights/living_room.yaml @@ -4,6 +4,8 @@ command_topic: "smartthings/Tower Lamp/switch" brightness_state_topic: "smartthings/Tower Lamp/level" brightness_command_topic: "smartthings/Tower Lamp/level" + color_temp_command_topic: "smartthings/Tower Lamp/colorTemperature" + color_temp_state_topic: "smartthings/Tower Lamp/colorTemperature" brightness_scale: 101 payload_on: "on" payload_off: "off" @@ -27,4 +29,24 @@ brightness_scale: 101 payload_on: "on" payload_off: "off" + retain: true +- platform: mqtt + name: "Master Bedroom Lamp" + state_topic: "smartthings/Jeff Lamp/switch" + command_topic: "smartthings/Jeff Lamp/switch" + brightness_state_topic: "smartthings/Jeff Lamp/level" + brightness_command_topic: "smartthings/Jeff Lamp/level" + brightness_scale: 101 + payload_on: "on" + payload_off: "off" + retain: true +- platform: mqtt + name: "Side Door Light" + state_topic: "smartthings/Side Door Light/switch" + command_topic: "smartthings/Side Door Light/switch" + brightness_state_topic: "smartthings/Side Door Light/level" + brightness_command_topic: "smartthings/Side Door Light/level" + brightness_scale: 101 + payload_on: "on" + payload_off: "off" retain: true \ No newline at end of file From 3b2f3015a193f08987c460253aff672a84993633 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:29:44 -0400 Subject: [PATCH 016/106] Added scripts back to repo --- scripts.yaml | 346 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 346 insertions(+) create mode 100644 scripts.yaml diff --git a/scripts.yaml b/scripts.yaml new file mode 100644 index 0000000..89205c8 --- /dev/null +++ b/scripts.yaml @@ -0,0 +1,346 @@ +washer_finished_notification_audible: + sequence: + - delay: + minutes: 15 + - condition: state + entity_id: sensor.family_status + state: Home + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - condition: state + entity_id: sensor.washer_status + state: complete + - service: tts.google_translate_say + entity_id: media_player.hass_speaker + data_template: + message: Just a reminder. Washing machine needs to be emptied. +girl_eyes_on_you: + sequence: + - service: media_player.play_media + entity_id: media_player.theater + data: + media_content_id: http://192.168.7.40/videos/Girl_EyesOnYou_H.mp4 + media_content_type: video +washer_idle: + sequence: + - service: mqtt.publish + data: + topic: house/washer/status + payload: idle + retain: true +washer_running: + sequence: + - service: mqtt.publish + data: + topic: house/washer/status + payload: running + retain: true +washer_complete: + sequence: + - service: mqtt.publish + data: + topic: house/washer/status + payload: complete + retain: true +add_logbook_entry: + alias: Add Logbook + sequence: + - service: logbook.log + data_template: + name: '{{ name }} + + ' + message: '{{ message }} + + ' +test_twitter: + sequence: + - service: script.twitter_notify + data: + message: Just a test of my notification capabilities! +climate_set_heat: + sequence: + - service: climate.set_operation_mode + data: + entity_id: climate.first_floor + operation_mode: heat +climate_turn_off: + sequence: + - data: + entity_id: climate.first_floor + operation_mode: 'off' + service: climate.set_operation_mode +climate_set_cool: + sequence: + - service: climate.set_operation_mode + data: + entity_id: climate.first_floor + operation_mode: cool +normal_tower: + sequence: + - service: light.turn_on + data: + entity_id: light.tower_lamp_2 + colorControl: blue +close_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: open + - service: cover.close_cover + entity_id: cover.cargo_bay +open_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: closed + - service: cover.open_cover + entity_id: cover.cargo_bay +play_skylars_christmas_playlist: + sequence: + - service: media_player.volume_set + data: + entity_id: media_player.spotify + volume_level: '0.40' + - service: media_player.select_source + data_template: + entity_id: media_player.spotify + source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere + {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room + {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif + is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom + {% endif %} + + ' + - service: media_player.play_media + data_template: + entity_id: media_player.spotify + media_content_type: playlist + media_content_id: spotify:user:spotify:playlist:2lmfykOn8EK0Ow8iH9XHLa + - service: media_player.shuffle_set + data: + entity_id: media_player.spotify + shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif + is_state("input_select.shuffle_spotify", "Off") %} False {% endif %} + + ' +play_skylars_playlist: + sequence: + - service: media_player.volume_set + data: + entity_id: media_player.spotify + volume_level: '0.40' + - service: media_player.select_source + data_template: + entity_id: media_player.spotify + source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere + {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room + {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif + is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom + {% endif %}' + - service: media_player.play_media + data_template: + entity_id: media_player.spotify + media_content_type: playlist + media_content_id: spotify:user:spotify:playlist:0hYKkmUpFFG37TtFX23cMM + - service: media_player.shuffle_set + data: + entity_id: media_player.spotify + shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif + is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}' +tornado_alarm: + sequence: + - service: shell_command.tornado_alarm +sunset_garage_open: + sequence: + - condition: state + entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor + state: 'on' + - service: script.driveway_all_on +jeff_destination_zoo: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Zoo + retain: true +jeff_destination_summit: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Summit + retain: true +jeff_destination_none: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: none + retain: true +jeff_destination_na: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: na + retain: true +jeff_destination_home: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Home + retain: true +jeff_destination_harbins: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Harbins + retain: true +jeff_at_work_notification: + sequence: + - condition: state + entity_id: input_boolean.text_notify_kat + state: 'on' + - service: notify.ios_katherinestonesiphone + data: + message: Jeff has arrived at Summit +inside_all_on: + sequence: + - event: LOGBOOK_ENTRY + event_data: + name: EVENT + message: Turning inside lights on. + - service: light.turn_on + data: + entity_id: light.tower_lamp_4 + - service: light.turn_on + data: + entity_id: light.front_lamp + - service: switch.turn_on + data: + entity_id: switch.fireplace_lights + - service: light.turn_on + data: + entity_id: light.table_lamp + - service: light.turn_on + data: + entity_id: light.kitchen_light_strip + - service: light.turn_on + data: + entity_id: light.kitchen_cabinets + - service: scene.turn_on + data: + entity_id: scene.livingroom_normal +inside_all_off: + sequence: + - event: LOGBOOK_ENTRY + event_data: + message: Turning inside lights off + name: EVENT + - data: + entity_id: light.tower_lamp_4 + service: light.turn_off + - data: + entity_id: light.table_lamp + service: light.turn_off + - data: + entity_id: light.front_lamp + service: light.turn_off + - data: + entity_id: light.kitchen_cabinets + service: light.turn_off + - data: + entity_id: light.kitchen_cabinet_lights + service: light.turn_off + - entity_id: switch.fireplace_lights + service: switch.turn_off + - entity_id: switch.upstairs + service: switch.turn_off + - entity_id: light.jeff_lamp + service: light.turn_off +all_fans_off: + sequence: + - data: + entity_id: switch.upstairs_fan + service: switch.turn_off + - data: + entity_id: switch.living_room_fan + service: switch.turn_off +family_is_home: + sequence: + - condition: state + entity_id: sensor.family_status + state: Away + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Home + retain: true +family_is_away: + sequence: + - condition: state + entity_id: sensor.family_status + state: Home + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Away + retain: true +driveway_on: + sequence: + - condition: state + entity_id: sun.sun + state: below_horizon + - data: + entity_id: switch.driveway_light + service: switch.turn_on + - data: + entity_id: light.side_door_light_2 + service: light.turn_on +driveway_off: + sequence: + - delay: + seconds: 120 + - condition: state + entity_id: binary_sensor.side_door + state: 'off' + - condition: state + entity_id: binary_sensor.garage_door + state: 'off' + - service: switch.turn_off + entity_id: switch.driveway_light + - service: switch.turn_off + entity_id: light.side_door_light_2 +chromecast_media_stop: + sequence: + - service: media_player.media_stop + data: + entity_id: media_player.theater +appliances_on: + sequence: + - service: switch.turn_on + data: + entity_id: switch.box_fans +appliances_off: + sequence: + - data: + entity_id: switch.box_fans + service: switch.turn_off + - data: + entity_id: switch.incense + service: switch.turn_off + - data: + entity_id: switch.artemis + service: switch.turn_off +voice_reports_off: + sequence: + - delay: + minutes: 5 + - service: input_boolean.turn_off + entity_id: input_boolean.play_weather_report + - service: script.turn_off + entity_id: script.weather_report \ No newline at end of file From 560b4887380453a17905295ca722167efc724a03 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:30:23 -0400 Subject: [PATCH 017/106] Moving back to MQTT for smartthings integration --- binary_sensors/doors.yaml | 42 ++++++++++++++++++++++++++++++++++++++ binary_sensors/motion.yaml | 6 ++++++ 2 files changed, 48 insertions(+) create mode 100644 binary_sensors/doors.yaml create mode 100644 binary_sensors/motion.yaml diff --git a/binary_sensors/doors.yaml b/binary_sensors/doors.yaml new file mode 100644 index 0000000..b1f0725 --- /dev/null +++ b/binary_sensors/doors.yaml @@ -0,0 +1,42 @@ +- platform: mqtt + name: "Back Door" + state_topic: "smartthings/Back Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: door +- platform: mqtt + name: "Garage Door" + state_topic: "smartthings/Garage Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: garage_door +- platform: mqtt + name: "Front Door" + state_topic: "smartthings/Front Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: door +- platform: mqtt + name: "Laundry Room Door" + state_topic: "smartthings/Laundry Room Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: door +- platform: mqtt + name: "Attic Door" # Dome Door Sensor + state_topic: "smartthings/Attic Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: door +- platform: mqtt + name: "Side Door" # Dome Door Sensor + state_topic: "smartthings/Side Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: door +- platform: mqtt + name: "Washer Door" + state_topic: "smartthings/Washer Door/contact" + payload_on: "open" + payload_off: "closed" + device_class: door \ No newline at end of file diff --git a/binary_sensors/motion.yaml b/binary_sensors/motion.yaml new file mode 100644 index 0000000..5140359 --- /dev/null +++ b/binary_sensors/motion.yaml @@ -0,0 +1,6 @@ +- platform: mqtt + name: "Garage Motion" # Dome Motion Sensor + state_topic: "smartthings/Garage Motion/contact" + payload_on: "active" + payload_off: "inactive" + device_class: motion \ No newline at end of file From 0501d27c80f8585526c2c7a92fd6995a05d07b05 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:31:10 -0400 Subject: [PATCH 018/106] Added washer automations back in --- automations.yaml | 640 +++++++++++++++++++++++------------------------ 1 file changed, 311 insertions(+), 329 deletions(-) diff --git a/automations.yaml b/automations.yaml index c4d154f..9169f09 100644 --- a/automations.yaml +++ b/automations.yaml @@ -1,220 +1,193 @@ - id: washer_running - alias: Washer Running + alias: Washer Running trigger: - - platform: numeric_state - entity_id: sensor.aeotec_dsc06106_smart_energy_switch_power - above: 100 + - above: 10 + entity_id: sensor.washer + platform: numeric_state action: - service: script.washer_running - + initial_state: true - id: washer_complete - alias: Washer Complete + alias: Washer Complete trigger: - - platform: numeric_state - entity_id: sensor.aeotec_dsc06106_smart_energy_switch_power - below: 5 + - below: '1' + entity_id: sensor.washer + platform: numeric_state condition: - condition: state entity_id: sensor.washer_status - state: 'running' + state: running action: - service: script.washer_complete - + initial_state: true - id: washer_emptied - alias: Washer Emptied + initial_state: true + alias: Washer Emptied trigger: - platform: state - entity_id: binary_sensor.ecolink_door_window_sensor_sensor + entity_id: binary_sensor.washer_door from: 'off' to: 'on' action: - service: script.washer_idle - -# - id: washer_notification -# alias: Washer Notification -# trigger: -# - platform: state -# entity_id: sensor.washer_status -# from: "running" -# to: "idle" -# condition: -# - condition: state -# entity_id: sensor.family_status -# state: home -# - platform: state -# entity_id: input_boolean.washer_notification -# to: 'on' -# action: -# - service: homeassistant.turn_on -# entity_id: script.washer_finished_notification - -- id: turn_of_disney - alias: Turn Off Disney + - service: script.turn_off + entity_id: script.washer_finished_notification_audible +- id: washer_notification + initial_state: true + alias: Washer Notification trigger: - - platform: state - entity_id: media_player.hass_speaker - from: 'playing' - to: idle + - platform: state + entity_id: sensor.washer_status + from: running + to: complete + condition: + - condition: state + entity_id: input_boolean.washer_notification + state: 'on' action: - - service: input_boolean.turn_off - entity_id: input_boolean.tiki_room_audio - - + - service: script.washer_finished_notification_audible +- id: turn_off_disney + initial_state: true + alias: Turn Off Disney + trigger: + - platform: state + entity_id: media_player.hass_speaker + from: playing + to: idle + action: + - service: input_boolean.turn_off + entity_id: input_boolean.tiki_room_audio + - service: input_boolean.turn_off + entity_id: input_boolean.happy_ever_after_show + - service: input_boolean.turn_off + entity_id: input_boolean.haunted_mansion + - service: input_boolean.turn_off + entity_id: input_boolean.boo_to_you_show + - service: input_boolean.turn_off + entity_id: input_boolean.spaceship_earth_ride + - service: input_boolean.turn_off + entity_id: input_boolean.mk_loop + - service: input_boolean.turn_off + entity_id: input_boolean.illuminations + - service: input_boolean.turn_off + entity_id: input_boolean.boo_to_you + - service: input_boolean.turn_off + entity_id: input_boolean.happy_ever_after - id: backup_hass + initial_state: true alias: Backup Hass trigger: - - platform: time - at: '05:00:00' + - platform: time + at: 05:00:00 action: - service: script.add_logbook_entry data_template: name: Backup - message: is running + message: is running - service: shell_command.backup - service: script.twitter_notify - data: - message: "I just kicked off a backup of #homeassistant to ensure I live on. Do you backup? " + data_template: + message: '{{ [ "I just kicked off a backup of #homeassistant to ensure I live + on. Do you backup? ", "Its important to backup your data. Thats why I just + intitiated a backup of my critical data. ", "With @home_assistant and the + #dropbox component it is easy to backup your important config files. Lets + do this thing! " ] | random }}' - id: net_speed_report + initial_state: true alias: Network Speed Report trigger: - - platform: time + - platform: time at: '11:15:00' action: - service: script.twitter_notify - data: - message: "According to my latest speed tests Anchorage House is getting {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} Mbps up thanks to #ATTFiber. " -- id: time_to_leave_summit - alias: Time to Leave Jeff - initial_state: true - trigger: - - platform: numeric_state - entity_id: sensor.home_summit - above: 50 - condition: - - condition: state - entity_id: sensor.jeff_location - state: Home - - condition: time - after: '05:30:00' - before: '07:00:00' - - condition: state - entity_id: input_boolean.jeff_traffic_alerts - state: 'on' - action: - - service: notify.jeff_ios - data: - message: Currently {{states.sensor.home_to_summit.attributes.duration | round}} - mins to Work. Leave. - - service: notify.twitter - data: - message: "Looks like traffic is bad out there so I let @thejeffreystone know. " -- id: hvac_cool_on - alias: hvac cool on - trigger: - - above: 78 - entity_id: climate.first_floor - platform: numeric_state - value_template: '{{ states.climate.first_floor.attributes.current_temperature }}' - condition: - - above: 83 - condition: numeric_state - entity_id: sensor.dark_sky_apparent_temperature - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - action: - - service: script.climate_set_cool - - data: - message: "The Temperature is a bit warm at Anchorage House, so Im turning - on the AC. " - service: script.twitter_notify - initial_state: true -- id: hvac_off - alias: hvac off - trigger: - - above: '55' - below: '80' - entity_id: sensor.dark_sky_apparent_temperature - platform: numeric_state - condition: - - above: '60' - below: '78' - condition: numeric_state - entity_id: climate.first_floor - value_template: '{{ states.climate.first_floor.attributes.current_temperature }}' - action: - - service: script.climate_turn_off - - data: - message: "The Temperature outside is perfect for opening windows at Anchorage - House, so Im turning off the HVAC. " - service: script.twitter_notify - initial_state: true -- id: hvac_heat_on - alias: hvac heat on - trigger: - - below: 61 - entity_id: climate.first_floor - platform: numeric_state - value_template: '{{ states.climate.first_floor.attributes.current_temperature }}' - condition: - - below: 50 - condition: numeric_state - entity_id: sensor.dark_sky_apparent_temperature - - state: 'off' - condition: state - entity_id: input_boolean.vacation_mode - action: - - service: script.climate_set_heat - - data: - message: "The Temperature is a bit chilly at Anchorage House, so Im turning - on the Heat. " - service: script.twitter_notify - initial_state: true - -- id: coffee_time - alias: Coffee Time + data_template: + message: '{{ [ "According to my latest speed tests Anchorage House is getting + {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} + Mbps up thanks to #ATTFiber. ", "How fast is your internet? I just checked + am Im seeing {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} + Mbps up. Beat that. ", "My speed is monitored using @home_assistant and https://github.com/thejeffreystone/speedtest_to_mqtt + and is {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} + Mbps up." ] | random }}' +- id: coffee_time_workday + alias: Coffee Time Workday initial_state: true trigger: - platform: time at: 05:15:00 + condition: + condition: state + entity_id: binary_sensor.workday_sensor + state: 'on' action: - service: scene.turn_on entity_id: scene.diminshed_livingroom_lighting - service: scene.turn_on entity_id: scene.diminished_kitchen_lighting -- id: good_morning - alias: Good Morning +- id: coffee_time_holiday + alias: Coffee Time Holiday initial_state: true trigger: - platform: time - at: '07:00:00' + at: 07:30:00 + condition: + condition: state + entity_id: binary_sensor.workday_sensor + state: 'off' + action: + - service: scene.turn_on + entity_id: scene.diminshed_livingroom_lighting + - service: scene.turn_on + entity_id: scene.diminished_kitchen_lighting + - service: switch.turn_off + entity_id: switch.rainbow_light_4 +- id: good_morning_workday + alias: Good Morning Workday + initial_state: true + trigger: + - platform: time + at: 06:30:00 + condition: + condition: state + entity_id: binary_sensor.workday_sensor + state: 'on' action: - service: scene.turn_on entity_id: scene.normal_livingroom_lighting - service: scene.turn_on entity_id: scene.normal_kitchen_lighting - service: switch.turn_off - entity_id: switch.rainbow_light + entity_id: switch.rainbow_light_4 - service: scene.turn_on entity_id: scene.jeff_light_on - service: script.twitter_notify - data: - message: 'Good Morning! Time to rise and shine at Anchorage House. ' + data_template: + message: '{{ [ "Good Morning! Time to rise and shine at Anchorage House. ", + "Good Morning from Anchorage House. Glad to see everyone made it. ", "Birds + are awake, and so is Anchorage House. Good morning everyone! " ] | random + }}' - id: skylar_bedtime alias: Skylar Bedtime initial_state: true trigger: - platform: time at: '19:15:00' + condition: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: switch.turn_on - entity_id: switch.rainbow_light + entity_id: switch.rainbow_light_4 - id: jeff_lights_out alias: Jeff lights out initial_state: true trigger: - platform: time at: '23:00:00' + condition: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: scene.turn_on entity_id: scene.jeff_light_off @@ -228,6 +201,9 @@ - condition: state entity_id: light.jeff_light state: 'on' + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: scene.turn_on entity_id: scene.jeff_bedtime @@ -241,6 +217,9 @@ - condition: state entity_id: light.jeff_light state: 'on' + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: scene.turn_on entity_id: scene.jeff_night_light @@ -250,6 +229,10 @@ trigger: - platform: time at: '20:00:00' + condition: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: scene.turn_on entity_id: scene.jeff_light_on @@ -259,6 +242,10 @@ trigger: - platform: time at: 05:15:00 + condition: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: scene.turn_on entity_id: scene.jeff_night_light @@ -268,6 +255,10 @@ trigger: - platform: time at: 05:30:00 + condition: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' action: - service: scene.turn_on entity_id: scene.jeff_wake_up @@ -283,19 +274,22 @@ - service: light.turn_off data: entity_id: light.loft_lamp - - service: script.turn_on - entity_id: script.driveway_off - service: switch.turn_off entity_id: switch.incense + - service: switch.turn_off + entity_id: switch.artemis - service: light.turn_off data: - entity_id: light.kitchen_light_strip + entity_id: light.kitchen_cabinet_lights - service: light.turn_off data: entity_id: light.kitchen_cabinets - service: script.twitter_notify - data: - message: 'Good Night from Anchorage House. ' + data_template: + message: '{{ [ "Good Night from Anchorage House. ", "Time to shut down this + party. Good Night from Anchorage House. ", "We have come to the end of our + broadcast day. Oh, who am I kidding. I''ll be up all night watching over Anchorage + House. " ] | random }}' - id: outside_lights_on_sunset alias: Outside Lights on at Sunset initial_state: true @@ -306,12 +300,15 @@ action: - service: switch.turn_on data: - entity_id: switch.leviton_dz15s_1bz_decora_smart_switch_switch + entity_id: switch.front_porch - service: script.sunset_garage_open - service: script.twitter_notify - data: - message: "Its getting dark at Anchorage House, so Im turning on the outside - lights. " + data_template: + message: '{{ [ "Its getting dark at Anchorage House, so Im turning on the outside + lights. ", "When the Sun goes down, I help out by turning on the outside lights. + Its the little things. ", "Its getting dark so let me spell out my name... + Wait. Did I break into a random #Hamilton song? Pardon me. umm. I just turned + on the outside lights at Anchorage House. " ] | random }}' - id: outside_lights_off_sunrise alias: Outside Lights off at Sunrise initial_state: true @@ -321,11 +318,13 @@ action: - service: switch.turn_off data: - entity_id: switch.leviton_dz15s_1bz_decora_smart_switch_switch + entity_id: switch.front_porch - service: script.twitter_notify - data: - message: "The sun is up at Anchorage House, so Im turning off the outside - lights. " + data_template: + message: '{{ [ "The sun is up at Anchorage House, so Im turning off the outside + lights. ", "I see the sun! Time to turn off the outside lights at Anchorage + House. ", "Dawn has broken at Anchorage House. Turning off the outside lights. + " ] | random }}' - id: inside_on_sunset alias: Inside on at Sunset initial_state: true @@ -334,7 +333,8 @@ event: sunset offset: -01:00:00 action: - service: script.inside_all_on + service: scene.turn_on + entity_id: scene.normal_livingroom_lighting - id: inside_off_sunrise alias: Inside off at Sunrise initial_state: true @@ -350,49 +350,6 @@ - service: script.inside_all_off - service: scene.turn_on entity_id: scene.jeff_light_off -- id: door_chime - alias: Door Chine - trigger: - - entity_id: binary_sensor.ecolink_door_window_sensor_sensor_3 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.ecolink_door_window_sensor_sensor_3 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.ecolink_door_window_sensor_sensor_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.ecolink_door_window_sensor_sensor_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.ecolink_door_window_sensor_sensor_4 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.ecolink_door_window_sensor_sensor_4 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.dome_door_window_sensor_sensor_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.dome_door_window_sensor_sensor_2 - from: 'on' - platform: state - to: 'off' - condition: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - action: - - service: shell_command.door_chime - initial_state: true - - id: ha_start alias: HA Startup initial_state: true @@ -403,55 +360,6 @@ service: frontend.set_theme data: name: midnight-AH -- id: close_garage_lights_out - alias: Close Garage at lights out - initial_state: true - trigger: - - platform: time - at: '22:30:00' - condition: - - condition: state - entity_id: cover.cargo_bay - state: open - action: - - service: script.close_garage -- id: garage_open_sunset - alias: Garage Open At Sunset - initial_state: true - trigger: - - platform: sun - event: sunset - condition: - - condition: state - entity_id: cover.cargo_bay - state: open - action: - - service: script.driveway_on -- id: garage_open_after_sunset - alias: Garage Opening Driveway Lights On - initial_state: true - trigger: - - platform: state - entity_id: cover.cargo_bay - from: closed - to: open - condition: - - condition: state - entity_id: sun.sun - state: below_horizon - action: - - service: script.driveway_on -- id: garage_closed_lights_off - alias: Garage Closing Driveway Lights Off - initial_state: true - trigger: - - platform: state - entity_id: cover.cargo_bay - from: open - to: closed - action: - - service: script.turn_on - entity_id: script.driveway_off - id: turn_off_audible_notifications alias: Turn Off Audible Notifications at 730pm initial_state: true @@ -483,41 +391,6 @@ action: - entity_id: input_boolean.audible_notifications service: input_boolean.turn_on -- id: nightly_lockdown - alias: Nightly Lockdown - initial_state: true - trigger: - - platform: time - at: '23:00:00' - condition: - - condition: state - entity_id: device_tracker.jeffreystonesiphone - state: home - - condition: state - entity_id: device_tracker.katherinestonesiphone - state: home - - condition: state - entity_id: input_boolean.guest_mode - state: 'off' - action: - - service: script.lockdown -- id: morning_standby - alias: Morning Standby - initial_state: true - trigger: - - platform: time - at: 05:30:00 - condition: - condition: or - conditions: - - condition: state - entity_id: sensor.family_status - state: Home - - condition: state - entity_id: input_boolean.guest_mode - state: 'on' - action: - - service: script.standby - id: jeff_eta_home alias: Jeff eta home initial_state: true @@ -549,9 +422,13 @@ action: - service: input_boolean.turn_on entity_id: input_boolean.jeff_traffic_alert_home - - service: nscript.twitter_notify - data: - message: "Looks like traffic is bad out there so I let @thejeffreystone know. " + - service: script.twitter_notify + data_template: + message: '{{ [ "Looks like traffic is bad out there so I let @thejeffreystone + know. ", "I dont think todays traffic is the worst I''ve seen, but its bad. + Letting my residents know they need to plan their trips. ", "Oh great...traffic + can''t get any worse. Maybe everyone should stay where they are. " ] | random + }}' - id: disable_bad_traffic_home_jeff alias: Disabling Jeff Bad Traffic Home initial_state: true @@ -569,39 +446,19 @@ action: - service: input_boolean.turn_off entity_id: input_boolean.jeff_traffic_alert_home -- id: enable_vacation_mode - alias: Enable Vacation Mode - initial_state: true - trigger: - - platform: numeric_state - entity_id: sensor.jeff_ett_home - above: 180 - - platform: numeric_state - entity_id: sensor.kat_ett_home - above: 180 - condition: - - condition: numeric_state - entity_id: sensor.jeff_ett_home - above: 180 - - condition: numeric_state - entity_id: sensor.kat_ett_home - above: 180 - action: - - service: input_boolean.turn_on - entity_id: input_boolean.vacation_mode - id: '1550107919204' - alias: Family Is Home + alias: Family Is Home Webhook trigger: - platform: webhook - webhook_id: family_is_home + webhook_id: home_webhook condition: [] action: - service: script.family_is_home - id: '1550108034209' - alias: Family Is Away + alias: Family Is Away Webhook trigger: - platform: webhook - webhook_id: '' + webhook_id: away_webhook condition: [] action: - service: script.family_is_away @@ -637,10 +494,10 @@ entity_id: sensor.family_status state: Away action: - - service: script.driveway_on - service: script.vacation_canceled - service: script.appliances_on - service: script.standby + - service: script.washer_finished_notification_audible initial_state: true - id: family_has_left alias: Family Has Left @@ -661,18 +518,16 @@ - service: script.security_check_zones - service: script.lockdown - service: script.lockdown_issue + - service: script.all_fans_off - id: jeff_is_home alias: Jeff is Home + initial_state: true trigger: - entity_id: device_tracker.jeffreystonesiphone event: enter platform: zone zone: zone.home - - entity_id: binary_sensor.jeffrey_presence - from: 'Off' - platform: state - to: 'On' - - entity_id: device_tracker.hass_jeffsiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.home @@ -683,7 +538,6 @@ - service: script.driveway_on - entity_id: input_boolean.jeff_travel_monitor service: input_boolean.turn_off - initial_state: true - id: jeff_arrives_summit alias: Jeff Arrives At Summit trigger: @@ -717,15 +571,15 @@ event: enter platform: zone zone: zone.home - - entity_id: binary_sensor.kat_presence - from: 'Off' - platform: state - to: 'On' + - entity_id: person.katherine + event: enter + platform: zone + zone: zone.home action: - service: script.family_is_home + - service: script.driveway_on - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor - - service: script.driveway_on - id: kat_arrives_zoo alias: Kat Arrives at Zoo initial_state: true @@ -739,10 +593,12 @@ entity_id: input_boolean.text_notify_jeff state: 'on' action: + - service: input_boolean.turn_off + entity_id: input_boolean.kat_travel_monitor - service: notify.jeff_ios data: message: Kat arrived at Zoo Atlanta - - service: tts.google_say + - service: tts.google_translate_say data: entity_id: media_player.hass_speaker message: Kat has arrived at the Zoo @@ -763,10 +619,136 @@ entity_id: input_boolean.kat_travel_monitor - id: '1550109528753' alias: Jeff Is Heading Home + initial_state: true trigger: - platform: webhook webhook_id: jeff_heading_home condition: [] action: - service: script.jeff_destination_home - +- id: '1558620708807' + alias: Upstairs Cooling On + initial_state: true + trigger: + - entity_id: binary_sensor.upstairs_occupancy + from: 'Off' + platform: state + to: 'On' + condition: + - above: '73' + condition: numeric_state + entity_id: sensor.upstairs_temperature + action: + - data: + entity_id: switch.box_fans + service: switch.turn_on +- id: '1558630577206' + alias: Garage Is Open at 9pm + initial_state: true + trigger: + - at: '21:00:00' + platform: time + condition: + - condition: state + entity_id: binary_sensor.garage_door + state: 'on' + action: + - data: + entity_id: input_boolean.garage_after_dark + service: input_boolean.turn_on +- id: '1559612300685' + alias: Garage Closed + initial_state: true + trigger: + - entity_id: binary_sensor.garage_door + from: 'on' + platform: state + to: 'off' + condition: [] + action: + - data: + entity_id: input_boolean.garage_after_dark + service: input_boolean.turn_off +- id: '1562066108032' + alias: Living Room Fan On + initial_state: true + trigger: + - entity_id: binary_sensor.living_room_occupancy + from: 'off' + platform: state + to: 'on' + condition: + - condition: state + entity_id: switch.living_room_fan + state: 'off' + action: + - data: + entity_id: switch.living_room_fan + service: switch.turn_on +- id: '1562067557778' + alias: Upstairs Fan On + initial_state: true + trigger: + - entity_id: binary_sensor.upstairs_occupancy + from: 'Off' + platform: state + to: 'On' + condition: + - condition: state + entity_id: switch.upstairs_fan + state: 'Off' + action: + - data: + entity_id: switch.upstairs_fan + service: switch.turn_on +- id: '1562067639239' + alias: Upstairs Fan Off + initial_state: true + trigger: + - entity_id: binary_sensor.upstairs_occupancy + from: 'On' + platform: state + to: 'Off' + condition: + - condition: state + entity_id: switch.upstairs_fan + state: 'On' + action: + - data: + entity_id: switch.upstairs_fan + service: switch.turn_off +- id: '1562630916597' + alias: Kat Pill Reminder + initial_state: true + trigger: + - at: 07:35:00 + platform: time + condition: + - condition: state + entity_id: input_boolean.text_notify_kat + state: 'on' + action: + - data: + message: Remember to take meds + service: notify.kat_ios +- id: new_ha + alias: New HA + initial_state: true + trigger: + - platform: state + entity_id: updater.updater + action: + - service: input_boolean.turn_on + entity_id: input_boolean.new_ha_announcement +- id: new_ha_annc + alias: New HA Annc + initial_state: true + trigger: + - entity_id: input_boolean.new_ha_announcement + from: 'Off' + platform: state + to: 'On' + action: + - service: script.twitter_new_ha + - service: input_boolean.turn_off + entity_id: input_boolean.new_ha_announcement \ No newline at end of file From f6125b8702790c7a16395ee3414d5575edc9c725 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:31:48 -0400 Subject: [PATCH 019/106] Added power sensor back in for washer notifications --- sensors/power.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sensors/power.yaml diff --git a/sensors/power.yaml b/sensors/power.yaml new file mode 100644 index 0000000..0f1df1e --- /dev/null +++ b/sensors/power.yaml @@ -0,0 +1,3 @@ +- platform: mqtt + name: "Washer" + state_topic: "smartthings/Washer/power" \ No newline at end of file From 9f21633f20e930c4d3040ce7f6b74d1f9da22b68 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:32:37 -0400 Subject: [PATCH 020/106] Moved security based config, automations, and scripts to its own package --- packages/security.yaml | 330 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 packages/security.yaml diff --git a/packages/security.yaml b/packages/security.yaml new file mode 100644 index 0000000..e29e853 --- /dev/null +++ b/packages/security.yaml @@ -0,0 +1,330 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 03/13/2019 +# @package : Security +# @description : Everything related to security functions. +############################################################################### + +input_boolean: + sentry_mode: + name: Sentry Mode + icon: mdi:security + vacation_mode: + name: Vacation Mode + icon: mdi:airplane-takeoff + guest_mode: + name: Guest Mode + icon: mdi:account-multiple + security_alarm: + name: Security Alarm + icon: mdi:speaker-wireless + fire_alarm: + name: Fire Alarm + icon: mdi:speaker-wireless + garage_after_dark: + name: Garage Open After Dark + icon: mdi:message-alert + lockdown_issue: + name: Lockdown Issue + icon: mdi:lock-reset + security_issue: + name: Security Issue + icon: mdi:alert-circle-outline + +automation: + - id: enable_vacation_mode + alias: Enable Vacation Mode + initial_state: true + trigger: + - platform: numeric_state + entity_id: sensor.jeff_ett_home + above: 180 + - platform: numeric_state + entity_id: sensor.kat_ett_home + above: 180 + condition: + - condition: numeric_state + entity_id: sensor.jeff_ett_home + above: 180 + - condition: numeric_state + entity_id: sensor.kat_ett_home + above: 180 + action: + - service: input_boolean.turn_on + entity_id: input_boolean.vacation_mode + + - id: morning_standby + alias: Morning Standby + initial_state: true + trigger: + - platform: time + at: 05:30:00 + condition: + condition: or + conditions: + - condition: state + entity_id: sensor.family_status + state: Home + - condition: state + entity_id: input_boolean.guest_mode + state: 'on' + action: + - service: script.standby + + - id: nightly_lockdown + alias: Nightly Lockdown + initial_state: true + trigger: + - platform: time + at: '23:00:00' + condition: + - condition: state + entity_id: device_tracker.jeffreystonesiphone + state: home + - condition: state + entity_id: device_tracker.katherinestonesiphone + state: home + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + action: + - service: script.lockdown + + - id: garage_open_sunset + alias: Garage Open At Sunset + initial_state: true + trigger: + - platform: sun + event: sunset + condition: + - condition: state + entity_id: binary_sensor.garage_door + state: "on" + action: + - service: script.driveway_on + + - id: close_garage_lights_out + alias: Close Garage at lights out + initial_state: true + trigger: + - platform: time + at: '22:30:00' + condition: + - condition: state + entity_id: binary_sensor.garage_door + state: "on" + action: + - service: input_boolean.turn_on + entity_id: input_boolean.security_issue + + - id: door_chime + alias: Door Chine + trigger: + - entity_id: binary_sensor.front_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.front_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.laundry_room_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.laundry_room_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.attic_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.attic_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.back_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.back_door_contact_2 + from: 'on' + platform: state + to: 'off' + condition: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + action: + - service: shell_command.door_chime + initial_state: true + + - id: security_breach_door + alias: Security Breach Doors + trigger: + - entity_id: binary_sensor.front_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.front_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.back_door_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.back_door_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.laundry_room_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.laundry_room_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.side_door_contact_2 + from: 'off' + platform: state + to: 'on' + - entity_id: binary_sensor.side_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.attic_door_contact_2 + from: 'on' + platform: state + to: 'off' + - entity_id: binary_sensor.garage_door + from: 'on' + platform: state + to: 'off' + condition: + - condition: state + entity_id: input_boolean.sentry_mode + state: 'on' + action: + - service: input_boolean.turn_on + entity_id: input_boolean.security_issue + initial_state: true + +script: + lockdown_issue: + sequence: + - condition: state + entity_id: group.external_doors + state: "on" + - condition: state + entity_id: sensor.family_status + state: "Away" + - service: input_boolean.turn_on + entity_id: input_boolean.lockdown_issue + + security_check_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: open + - service: input_boolean.turn_on + entity_id: input_boolean.lockdown_issue + + security_check_zones: + sequence: + - condition: state + entity_id: group.doors + state: 'on' + - service: input_boolean.turn_on + entity_id: input_boolean.lockdown_issue + + lockdown: + sequence: + - condition: state + entity_id: group.external_doors + state: "off" + - service: input_boolean.turn_on + entity_id: input_boolean.sentry_mode + + standby: + sequence: + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' + - service: input_boolean.turn_off + entity_id: input_boolean.sentry_mode + - service: input_boolean.turn_off + entity_id: input_boolean.security_issue + - service: input_boolean.turn_off + entity_id: input_boolean.security_alarm + + visitors_here: + sequence: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - service: input_boolean.turn_on + data: + entity_id: input_boolean.guest_mode + - service: shell_command.haunted_guest_welcome + + visitors_gone: + sequence: + - service: input_boolean.turn_off + data: + entity_id: input_boolean.guest_mode + + notification_security_alarm_audio: + sequence: + - service: shell_command.security_alarm + + + + notification_sentry_mode_activated_audio: + sequence: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - condition: state + entity_id: media_player.hass_speaker + state: 'idle' + - service: tts.google_say + entity_id: media_player.hass_speaker + data_template: + message: "Sentry mode activated" + + notification_sentry_mode_deactivated_audio: + sequence: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - condition: state + entity_id: media_player.hass_speaker + state: 'idle' + - service: tts.google_say + entity_id: media_player.hass_speaker + data_template: + message: "Sentry mode deactivated" + + notification_sentry_mode_deactiviated_text: + sequence: + - service: notify.jeff_ios + data: + message: Sentry Mode Deactivated + + notification_sentry_mode_activiated_text: + sequence: + - service: notify.jeff_ios + data: + message: Sentry Mode Activated + + vacation_canceled: + sequence: + - data: + entity_id: input_boolean.vacation_mode + service: input_boolean.turn_off From 3e8e7b813a4eed932a87c1edb433ec513fd1303b Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:33:33 -0400 Subject: [PATCH 021/106] Maint based package for managing local zwave - DISABLED --- packages/maintenance.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/maintenance.yaml diff --git a/packages/maintenance.yaml b/packages/maintenance.yaml new file mode 100644 index 0000000..09d1e62 --- /dev/null +++ b/packages/maintenance.yaml @@ -0,0 +1,33 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 02/19/2019 +# @package : Maintenance +# @description : Automations and scripts geared to Home Assistant and Home Automation Maintenance. +############################################################################### +# automation: +# - id: heal_zwave +# alias: Heal Zwave +# initial_state: true +# trigger: +# - platform: time +# at: '12:37:00' +# action: +# - service: zwave.heal_network +# - service: script.twitter_notify +# data_template: +# message: >- +# {{ [ +# "This seems like a good time to heal the zwave network at Anchorage House. ", +# "Always working thanks to #homeassistant. Things are quiet, lets kick off a zwave heal. ", +# "Zwave is critical to the automation at Anchorage House. Well, if you consider making it so no one has to touch a switch critical. In order to keep things tip top, lets heal zwave. " +# ] | random }} + + + # - id: test_zwave + # alias: test Zwave + # initial_state: true + # trigger: + # - platform: time + # at: '00:02:17' + # action: + # service: zwave.test_network From da0892115f38a34b79b99b38f5c85635879a0583 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:34:08 -0400 Subject: [PATCH 022/106] Updated groups to use in automations and scripts --- groups.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/groups.yaml b/groups.yaml index 69115c3..25dbfe7 100644 --- a/groups.yaml +++ b/groups.yaml @@ -31,12 +31,22 @@ House Conditions: - sensor.accurite_garage_humidity External Doors: - - binary_sensor.dome_door_window_sensor_sensor - - binary_sensor.ecolink_door_window_sensor_sensor_2 - - binary_sensor.ecolink_door_window_sensor_sensor_3 - - binary_sensor.ecolink_door_window_sensor_sensor_4 - - binary_sensor.ecolink_garage_door_tilt_sensor_sensor + - binary_sensor.side_door_contact_2 + - binary_sensor.front_door_contact_2 + - binary_sensor.back_door_contact_2 + - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.garage_door Internal Doors: - - binary_sensor.dome_door_window_sensor_sensor_2 + - binary_sensor.attic_door_contact_2 +Disney Audio: + - input_boolean.tiki_room_audio + - input_boolean.happy_ever_after_show + - input_boolean.haunted_mansion + - input_boolean.boo_to_you_show + - input_boolean.spaceship_earth_ride + - input_boolean.mk_loop + - input_boolean.illuminations + - input_boolean.boo_to_you + - input_boolean.happy_ever_after From 5e5255479497d529f413a1a1a140122cc061cf44 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:34:32 -0400 Subject: [PATCH 023/106] Removed unused configurations --- configuration.yaml | 140 +++++++++++++++------------------------------ 1 file changed, 45 insertions(+), 95 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index bbbb45c..f655772 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -10,9 +10,15 @@ homeassistant: - type: homeassistant packages: !include_dir_named packages +default_config: + +ssdp: + +zeroconf: + system_health: -default_config: +mobile_app: person: @@ -21,7 +27,7 @@ frontend: javascript_version: latest http: - api_password: !secret MY_API_PASS + #api_password: !secret MY_API_PASS #ssl_certificate: !secret SSL_CERT #ssl_key: !secret SSL_KEY #base_url: !secret BASEURL @@ -32,66 +38,18 @@ http: trusted_proxies: - 127.0.0.1 - ::1 - trusted_networks: - - 127.0.0.1 - # - 192.168.7.0/24 ip_ban_enabled: True login_attempts_threshold: 5 config: cloud: - alexa: - filter: - include_domains: - - switch - - light - - cover - - scene - - script - - input_boolean - - climate - - sensor - exclude_domains: - - group - - alert - - automation - entity_config: - sensor.accurite_back_porch_temperature: - name: Back Porch - description: Back Porch Temperature - sensor.accurite_garage_temperature: - name: Garage - description: Garage Temperature - sensor.kat_location: - name: Kats Location - description: Kats Location - sensor.jeff_location: - name: Jeffs Location - description: Jeffs Location - sensor.jeff_ett_home: - name: Jeffs Arrival - description: Jeffs arrival in minutes - sensor.kat_ett_home: - name: Kats Arrival - description: Kats arrival in minutes - sensor.accurite_garage_humidity: - name: Garage Humidity - description: Garage Humidity + + +wemo: + discovery: true -#alexa: -# homekit: -# filter: -# include_domains: -# - switch -# - light -# - cover -# - scene -# - input_boolean -# - climate -# - sensor -# - binary_sensor weather: - platform: darksky @@ -101,31 +59,18 @@ weather: conversation: device_tracker: - - platform: icloud - username: !secret ICLOUD_USER - password: !secret ICLOUD_PASS - track_new_devices: yes - - platform: owntracks - track_new_devices: yes - - platform: life360 - username: !secret life360_username - password: !secret life360_password - max_gps_accuracy: 200 - prefix: life360 - show_as_state: driving, moving, places + # - platform: icloud + # username: !secret ICLOUD_USER + # password: !secret ICLOUD_PASS + # track_new_devices: yes + # - platform: owntracks + # #- platform: eero_tracker # consider_home: 300 # interval_seconds: 60 # track_new_devices: yes # only_macs: "50:dc:e7:5b:10:69, b0:ee:7b:94:31:21, e8:b2:ac:4c:8c:01, 7c:1c:4e:2e:62:30, 90:18:7c:84:46:ed, 48:ba:4e:65:d3:ff, d0:e7:82:ef:a6:1f, 28:18:78:74:79:10, e8:ab:fa:02:03:53, 48:d6:d5:42:e8:86, 60:f8:1d:be:20:46, 68:54:fd:d5:ae:3d, 00:d0:2d:2f:3b:ca, 6c:70:9f:00:ef:3f, 5c:cf:7f:af:04:50, 68:54:fd:29:20:87, 64:52:99:93:f1:b3, 7c:2e:bd:4f:3e:ff" -#calendar: -# - platform: caldav -# url: !secret icloud_cal -# username: !secret icloud_cal_user -# password: !secret icloud_cal_pass -# calendars: -# - 'JKS Calendar' google: client_id: !secret google_client_id @@ -133,18 +78,15 @@ google: -# geo_location: -# - platform: usgs_earthquakes_feed -# feed_type: 'past_day_all_earthquakes' - discovery: + enable: + - dlna_dmr updater: #include_used_components: true sun: -#https://home-assistant.io/components/recorder/ recorder: #db_url: sqlite:///data/home-assistant_v2.db purge_keep_days: 2 @@ -157,8 +99,7 @@ recorder: - sun.sun # Don't record sun data - sensor.last_boot # Comes from 'systemmonitor' sensor platform - sensor.date -# purge_interval: 1 -# purge_keep_days: 3 + logbook: include: @@ -171,14 +112,11 @@ logbook: - script - input_boolean - -#https://home-assistant.io/components/logger/ logger: default: warning logs: homeassistant.components.sensor.alpha_vantage: debug -# homeassistant.components.sensor.template: critical -# homeassistant.components.cover: critical + history: include: @@ -193,10 +131,17 @@ cast: speedtestdotnet: mqtt: - broker: 192.168.7.67 - port: 1883 - username: !secret MQTT_USER - password: !secret MQTT_PASS + broker: 192.168.7.67 + port: 1883 + username: !secret MQTT_USER + password: !secret MQTT_PASS + discovery: true + birth_message: + topic: 'hass/status' + payload: 'online' + will_message: + topic: 'hass/status' + payload: 'offline' camera: - platform: mjpeg @@ -223,7 +168,12 @@ cloudflare: records: - ah +life360: + accounts: + - username: !secret life360_username + password: !secret life360_password +media_extractor: ### Includes ### alert: !include_dir_merge_named alerts/ @@ -238,6 +188,7 @@ intent_script: !include intents/intents.yaml scene: !include scenes.yaml input_select: !include input_select.yaml input_boolean: !include input_boolean.yaml +input_datetime: !include input_datetime.yaml zone: !include zones.yaml python_script: @@ -246,7 +197,7 @@ python_script: # domain: !secret duckdns_domain # access_token: !secret duckdns_token -### Devices and Services +### Services # Disabled due to bug that causes too many open files - Need to track it down # cover: @@ -255,12 +206,8 @@ python_script: # password: !secret myq_pass # type: chamberlain -climate: - platform: honeywell - username: !secret HONEYWELL_USER - password: !secret HONEYWELL_PASS - region: us - scan_interval: 600 +ecobee: + api_key: !secret ecobee_api map: @@ -268,6 +215,9 @@ map: # usb_path: /dev/ttyACM0 # network_key: !secret zwave_key +googlehome: + devices: + - host: 192.168.7.97 ### Custom Commands shell_command: From 0a603a090351f032dcba6203a76efb1de912d0c2 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:35:56 -0400 Subject: [PATCH 024/106] Replaced Honeywell Thermostat with Ecobee --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0738833..4a7fb2a 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ One last thing. Everything in this configuration is a combination of the things None of the following links are affiliate links, and are included merely as reference. * Apple Devices (Macbooks, Mac Mini, iPhones, iPads) -* [Honeywell Wifi Thermostat](http://a.co/cqvrljP) +* [Ecobee Thermostat](https://www.ecobee.com/) * [Amazon Echo Dot](http://a.co/7VYHqvw) * Amazon Echo Gen 2 * [Smartthings](http://a.co/2xWyXF5) From a03b3e56006df362976229516717b64028605254 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:36:27 -0400 Subject: [PATCH 025/106] Added Skylar to the config --- customize.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/customize.yaml b/customize.yaml index f920ac7..d6a1670 100644 --- a/customize.yaml +++ b/customize.yaml @@ -135,6 +135,11 @@ sensor.kat_destination: icon: mdi:google-maps name: "Jeffs Destination" +# Skylar + +sensor.skylar_location: + entity_picture: !secret SKYLAR_ICON + # Device ## device_tracker.gateway2f3bca: icon: mdi:nest-thermostat From ab8c285e93682da692f9bc6678bef907743da7cb Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:39:08 -0400 Subject: [PATCH 026/106] Updated clothing sensor and updated update_scan to scan_interval --- sensors/weather.yaml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/sensors/weather.yaml b/sensors/weather.yaml index 5a8382b..cc25c4b 100644 --- a/sensors/weather.yaml +++ b/sensors/weather.yaml @@ -26,18 +26,13 @@ - hourly_summary - daily_summary - precip_intensity_max - update_interval: + scan_interval: # At least one of these must be specified: days: 0 hours: 0 minutes: 5 seconds: 0 milliseconds: 0 -- platform: pollen - zip_code: "30017" - monitored_conditions: - - allergy_index_today - - asthma_index_today ## Accurite 158 - Back Porch - platform: mqtt name: "Accurite Back Porch Temperature" @@ -76,22 +71,22 @@ friendly_name: "Clothing Forecast" unit_of_measurement: '' value_template: >- - {%- if states('sensor.dark_sky_daytime_high_temperature_0')|float > 63 %} - {%- if states('sensor.dark_sky_daytime_high_temperature_0')|float < 80 %} + {%- if states('sensor.dark_sky_daytime_high_temperature_0d')|float > 63 %} + {%- if states('sensor.dark_sky_daytime_high_temperature_0d')|float < 80 %} Nice - {% elif states('sensor.dark_sky_daytime_high_temperature_0')|float > 95 %} + {% elif states('sensor.dark_sky_daytime_high_temperature_0d')|float > 95 %} Hot {% else %} Toasty {%- endif %} - {% elif states('sensor.dark_sky_daytime_high_temperature_0')|float < 64 %} - {%- if states('sensor.dark_sky_daytime_high_temperature_0')|float < 32 %} + {% elif states('sensor.dark_sky_daytime_high_temperature_0d')|float < 64 %} + {%- if states('sensor.dark_sky_daytime_high_temperature_0d')|float < 32 %} Freezing - {% elif states('sensor.dark_sky_daytime_high_temperature_0')|float > 50 %} + {% elif states('sensor.dark_sky_daytime_high_temperature_0d')|float > 50 %} Chilly {% else %} Cold {%- endif %} {% else %} Unknown - {%- endif %} \ No newline at end of file + {%- endif %} From c27f1d77674c906c71c2635c1aa2656e55607084 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:40:26 -0400 Subject: [PATCH 027/106] Updated google_say to google_translate_say and moved to timedate inputs for automation triggers --- packages/announcements.yaml | 49 ++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 33d149f..1dcd419 100644 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -56,7 +56,7 @@ script: - condition: state entity_id: group.family state: 'on' - - service: tts.google_say + - service: tts.google_translate_say data: entity_id: media_player.hass_speaker message: Unauthorized Access @@ -72,25 +72,39 @@ script: automation: - id: prebed_routine - alias: Prebed Routine + initial_state: true + alias: Skylar Nightly Announcements trigger: - - platform: time - at: '19:00:00' + platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" + condition: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' action: - service: script.prebed_routine - id: nightly_report + initial_state: true alias: Nightly Report trigger: - - platform: time - at: '18:45:00' + platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" + condition: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' action: - service: script.nightly_report - id: good_morning_report alias: Good Morning Report initial_state: true trigger: - - platform: time - at: 07:45:00 + platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" + condition: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' action: - service: script.morning_report - service: script.twitter_notify @@ -101,8 +115,8 @@ automation: alias: Skylar Morning Greeting initial_state: true trigger: - - platform: time - at: 07:58:00 + platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" condition: - condition: time weekday: @@ -112,8 +126,21 @@ automation: - thu - fri - condition: state - entity_id: input_boolean.skylar_dressed_alarm + entity_id: input_boolean.audible_notifications state: 'on' action: - service: script.skylar_morning_greeting + - id: play_weather_report + alias: Play Weather Report + initial_state: true + trigger: + - entity_id: input_boolean.play_weather_report + from: 'Off' + platform: state + to: 'On' + action: + - service: script.turn_on + entity_id: script.weather_report + - service: script.voice_reports_off + From 6cc011e6ef08579e06c430c6d2d3f31a0046c89c Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:42:32 -0400 Subject: [PATCH 028/106] Moving from shell commands to media_player for audio --- packages/disney.yaml | 125 ++++++++++++++++++++++++++++++++----------- 1 file changed, 94 insertions(+), 31 deletions(-) diff --git a/packages/disney.yaml b/packages/disney.yaml index c37b8c3..c85d77b 100644 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -1,8 +1,8 @@ ############################################################################### # @author : Jeffrey Stone -# @date : 02/19/2019 +# @date : 03/13/2019 # @package : Disney -# @description : A little Imaginering to bring disney into our home. +# @description : A little Imaginering to bring disney into our home. ############################################################################### input_boolean: @@ -112,6 +112,8 @@ automation: action: - service: script.turn_on entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker - id: happy_ever_after_on alias: Happy Ever After On initial_state: true @@ -122,7 +124,7 @@ automation: action: - service: script.turn_on entity_id: script.happy_ever_after - - id: happy_ever_after_on + - id: happy_ever_after_off alias: Happy Ever After Off initial_state: true trigger: @@ -132,6 +134,8 @@ automation: action: - service: script.turn_on entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker - id: haunted_mansion_on alias: Haunted Mansion On initial_state: true @@ -150,8 +154,9 @@ automation: entity_id: input_boolean.haunted_mansion to: 'off' action: - - service: script.turn_on - entity_id: script.kill_this_ride + - service: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker - id: spaceship_earth_on alias: Spaceship Earth On initial_state: true @@ -172,6 +177,8 @@ automation: action: - service: script.turn_on entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker - id: boo_to_you_show_on alias: Boo To You Show On initial_state: true @@ -192,6 +199,8 @@ automation: action: - service: script.turn_on entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker - id: boo_to_you_on alias: Boo To You On initial_state: true @@ -212,6 +221,8 @@ automation: action: - service: script.turn_on entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker - id: holiday_wisher_on alias: Holiday Wishes On initial_state: true @@ -232,6 +243,8 @@ automation: action: - service: script.turn_on entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.hass_speaker script: kill_hurry_back: @@ -257,25 +270,25 @@ script: - service: shell_command.haunted_mansion_hurry_back_full haunted_lights_on: sequence: - - delay: 00:02:16 + - delay: 00:02:25 - service: scene.turn_on data: entity_id: scene.haunted_preshow - house_lights_on: - sequence: - - delay: 00:04:12 - - service: scene.turn_on - data: - entity_id: scene.normal_livingroom_lighting + # house_lights_on: + # sequence: + # - delay: 00:04:20 + # - service: scene.turn_on + # data: + # entity_id: scene.normal_livingroom_lighting haunted_lights_out: sequence: - - delay: 00:02:05 + - delay: 00:02:15 - service: scene.turn_on data: entity_id: scene.haunted_lights_out haunted_preshow: sequence: - - delay: 00:01:05 + - delay: 00:01:15 - service: scene.turn_on data: entity_id: scene.haunted_preshow @@ -287,7 +300,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.haunted_mansion_preshow_full + #- service: shell_command.haunted_mansion_preshow_full + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 + media_content_type: "music" - data: entity_id: script.haunted_preshow service: script.turn_on @@ -385,7 +403,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.dance_it + #- service: shell_command.dance_it + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/move_it_shake_dance_audio.mp3 + media_content_type: "music" spaceship_earth_ride: sequence: - condition: state @@ -394,7 +417,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.spaceship_earth_ride + #- service: shell_command.spaceship_earth_ride + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: media/audio/spaceship_earth_ride.mp3 + media_content_type: "music" welcome_to_magic_kingdom: sequence: - condition: state @@ -439,7 +467,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.welcome_show_crowd + #- service: shell_command.welcome_show_crowd + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/welcome_show_crowd.mp3 + media_content_type: "music" holiday_wishes_start: sequence: - condition: state @@ -458,16 +491,26 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.holiday_wishes + #- service: shell_command.holiday_wishes + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/wishes_5_min.mp3 + media_content_type: "music" boo_to_you_show: sequence: - condition: state entity_id: input_boolean.audible_notifications state: 'on' - condition: state - entity_id: group.family - state: 'on' - - service: shell_command.boo_to_you + entity_id: sensor.family_status + state: Home + #- service: shell_command.boo_to_you + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/boo_to_you_audio.mp3 + media_content_type: "music" happy_ever_after_show: sequence: - condition: state @@ -476,7 +519,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.happily_ever_after + #- service: shell_command.happily_ever_after + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 + media_content_type: "music" boo_to_you: sequence: - condition: state @@ -485,7 +533,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.boo_to_you + #- service: shell_command.boo_to_you + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/boo_to_you_audio.mp3 + media_content_type: "music" tiki_room_audio: sequence: - condition: state @@ -508,34 +561,39 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.happily_ever_after + #- service: shell_command.happily_ever_after + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 + media_content_type: "music" illuminations_lights_out: sequence: - - delay: 00:00:47 + - delay: 00:00:57 - service: scene.turn_on data: entity_id: scene.haunted_lights_out illuminations_single_light: sequence: - - delay: 00:00:52 + - delay: 00:01:03 - service: scene.turn_on data: entity_id: scene.dimished_livingroom_lighting illuminations_dual_light: sequence: - - delay: 00:00:59 + - delay: 00:01:08 - service: scene.turn_on data: entity_id: scene.illuminations_livingroom_lighting_two illuminations_triple_light: sequence: - - delay: 00:01:04 + - delay: 00:01:11 - service: scene.turn_on data: entity_id: scene.illuminations_livingroom_lighting_three illuminations_show: sequence: - - delay: 00:01:10 + - delay: 00:01:19 - service: scene.turn_on data: entity_id: scene.normal_livingroom_lighting @@ -552,7 +610,12 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: shell_command.illuminations_audio + #- service: shell_command.illuminations_audio + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/illuminations.mp3 + media_content_type: "music" - service: script.turn_on entity_id: script.illuminations_preshow - service: script.turn_on From f9c80f9bcf1d04e2d382fe278d594b731e9efef1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:43:09 -0400 Subject: [PATCH 029/106] Added new voice notifications to use for status reports trigger via alexa routine --- packages/notify.yaml | 67 +++++++++++++++++++++++++++++++------------- 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index 55d0aff..9902dd2 100644 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -11,7 +11,7 @@ # key: !secret IFTTT_API_KEY tts: - - platform: google + - platform: google_translate cache: true cache_dir: /tmp/tts time_memory: 300 @@ -29,6 +29,10 @@ notify: services: - service: ios_jeffreystonesiphone - service: ios_jeffreystonesipad + - name: kat_ios + platform: group + services: + - service: ios_katherinestonesiphone - name: 'Master Bedroom Echo' platform: command_line command: "/home/homeassistant/bin/alexa_wrapper -d 'Master Bedroom'" @@ -94,7 +98,7 @@ script: - condition: state entity_id: input_boolean.vacation_mode state: 'off' - - service: tts.google_say + - service: tts.google_translate_say data_template: entity_id: media_player.hass_speaker message: > @@ -121,25 +125,11 @@ script: - condition: state entity_id: media_player.hass_speaker state: 'idle' - - service: tts.google_say + - service: tts.google_translate_say data_template: entity_id: media_player.hass_speaker message: > - {% set msg = "" %} - {% macro getGreeting() %} - {% if greeting | default('yes', true ) == "yes" %} - {% if now().hour|int < 12 %} - Good morning. - {% elif now().hour|int < 18 %} - Good afternoon. - {% else %} - Good evening. - {% endif %} - {% endif %} - {% endmacro %} - {% set msg = msg + getGreeting() %} - {% set msg = msg + " " + message %} - {{ msg }} + {{message }} ############################################################################### @@ -218,6 +208,42 @@ script: data_template: message: !include ../templates/nightly_report.yaml +############################################################################### +# Weather Report +############################################################################### + weather_report: + sequence: + - service: script.voice_notify + data_template: + message: !include ../templates/weather_report.yaml + +############################################################################### +# Traffic Report +############################################################################### + traffic_report: + sequence: + - service: script.voice_notify + data_template: + message: !include ../templates/traffic_report.yaml + +############################################################################### +# Jeff ETA Report +############################################################################### + jeff_eta_report: + sequence: + - service: script.voice_notify + data_template: + message: !include ../templates/jeff_eta.yaml + +############################################################################### +# Kat ETA Report +############################################################################### + kat_eta_report: + sequence: + - service: script.voice_notify + data_template: + message: !include ../templates/kat_eta.yaml + ############################################################################### # Prebed Routing ############################################################################### @@ -225,5 +251,6 @@ script: sequence: - service: script.voice_notify data_template: - message: > - Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. + message: !include ../templates/skylar_night.yaml + # message: > + # Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. From f017bbda6e62207b84f7f1aefea10bcf0c13de66 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:43:49 -0400 Subject: [PATCH 030/106] Updated voice notification wording --- packages/usps.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/usps.yaml b/packages/usps.yaml index f8c9a72..54c128d 100644 --- a/packages/usps.yaml +++ b/packages/usps.yaml @@ -33,6 +33,7 @@ camera: automation: - id: reset_usps + initial_state: true alias: Reset USPS trigger: - platform: time @@ -45,6 +46,7 @@ automation: message: Reset Mail Count - id: get_usps + initial_state: true alias: Get USPS trigger: - platform: time @@ -74,9 +76,9 @@ automation: data_template: message: > {%- if states.sensor.usps_mail.state | int == 1 -%} - Attention: USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today. + USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today. {%- else -%} - Attention: USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today. + USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today. {%- endif -%} - service: notify.jeff_ios data_template: @@ -107,7 +109,7 @@ automation: data_template: message: > {%- if states.sensor.usps_packages.state | int == 1 -%} - Attention: USPS is delivering {{ states.sensor.usps_packages.state }} package today. + USPS is delivering {{ states.sensor.usps_packages.state }} package today. {%- else -%} - Attention: USPS is delivering {{ states.sensor.usps_packages.state }} packages today. - {%- endif -%} \ No newline at end of file + USPS is delivering {{ states.sensor.usps_packages.state }} packages today. + {%- endif -%} From b3a4ea8ce5bcbdccd019271e463af226be358baf Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:44:08 -0400 Subject: [PATCH 031/106] Cleaned up space notifications --- packages/space.yaml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/packages/space.yaml b/packages/space.yaml index c6d464a..05d8651 100644 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -54,6 +54,7 @@ sensor: automation: - id: iss_tweet + initial_state: true alias: 'ISS Tweet' trigger: - platform: state @@ -66,24 +67,40 @@ automation: data_template: message: >- {{ [ - "The #ISS is passing over. Wave.", - "The #ISS just flew by and there is 1 Starman driving a #Tesla and {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in", - "The #ISS just flew by and there are {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in" - ] | random + " #Space #theycanseeourhouse"}} + "The #ISS is passing over. Wave. #Space #theycanseeourhouse ", + "The #ISS just flew by with there are {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people doing cool stuff. #Space #theycanseeourhouse", + "The #ISS just flew by with {{states.binary_sensor.iss.attributes.number_of_people_in_space}} people in it. #Space #theycanseeourhouse" + ] | random }} + + - id: iss_notification + initial_state: true + alias: 'ISS Notification' + trigger: + - platform: state + entity_id: + - binary_sensor.iss + to: 'on' + from: 'off' + action: + - service: script.voice_notify + data_template: + message: !include ../templates/iss_report.yaml + - id: full_moon_tweet + initial_state: true alias: 'Full Moon -Tweet' trigger: - platform: state entity_id: sensor.moon - to: 'Full Moon' + to: 'full_moon' action: - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - service: script.twitter_notify data_template: message: >- {{ [ - "There is a Full Moon out tonight, and this time it's the actual moon and not the neighbor.", - "Hey look kids, There's the full moon.", - "The moon is huge! And full." + "There is a Full Moon out tonight, and this time it's the actual moon and not the neighbor. ", + "Hey look kids, There's the full moon. ", + "The moon is huge! And full. " ] | random + "#Space #fullmoon"}} From dd2f594bb4eedff583280b1e3bd7740bdc4a7a2b Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:44:41 -0400 Subject: [PATCH 032/106] Added tweets to the weather alerts --- packages/weather_alerts_nws.yaml | 40 ++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index ec70060..5e9b6d8 100644 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -30,7 +30,7 @@ group: sensor: - platform: nws_alerts - zone_id: 'GAZ034' + zone_id: 'GAZ034,GAC135' automation: - alias: 'NWS Weather Alert Pop Up Control' @@ -134,6 +134,11 @@ automation: {% else %} The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }} {% endif %} + - service: script.twitter_notify + data_template: + message: '{{ [ "Anchorage House is battening down the hatches. Servere Weather is imminent. ", + "The weather outside is getting intense, so I just made a weather announcement.", + "Anchorage House monitors the NWS using #HomeAssistant just for these occasions. Thanks for the heads up @NWSAtlanta " ] | random }}' - delay: '00:00:15' - service: script.voice_notify data_template: @@ -163,11 +168,16 @@ automation: - condition: template value_template: "{{states.sensor.nws_alerts.state | int > 0}}" - condition: template - value_template: "{{ 'Tornado' in states.sensor.nws_alerts.attributes.title and 'Warning' in states.sensor.nws_alerts.attributes.title }}" + value_template: "{{ 'Tornado Warning' in states.sensor.nws_alerts.attributes.title}}" action: - service: script.alert_notify data_template: message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area." + - service: script.twitter_notify + data_template: + message: '{{ [ "NWS is sounding the Tornado alarm, so I am too. Anchorage House is taking cover. ", + "Anchorage House is heading to the closet because the NWS just issued a tornado warning for our area.", + "I just activated the internal Tornado Alarm at the request of the NWS. Thanks for the heads up @NWSAtlanta " ] | random }}' - delay: '00:00:15' - service: script.alert_notify data_template: @@ -179,6 +189,32 @@ automation: data_template: message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area." + - alias: Activate Tornado alarm + initial_state: 'on' + trigger: + - platform: state + entity_id: input_boolean.tornado_alarm + from: 'off' + to: 'on' + action: + - service: media_player.play_media + entity_id: media_player.hass_speaker + data: + media_content_id: /media/audio/Tornado_Siren.mp3 + media_content_type: "music" + + - alias: Deactivate Tornado alarm + initial_state: 'on' + trigger: + - platform: state + entity_id: input_boolean.tornado_alarm + from: 'on' + to: 'off' + + action: + - service: media_player.media_stop + entity_id: media_player.hass_speaker + script: nws_popup_on_wx_alert: alias: NWS Weather Alert Pop Up From 218dfc651dc0e20d85f2f1f3c18e715a41bcbaac Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:45:42 -0400 Subject: [PATCH 033/106] Added sensor batteries to MQTT smartthings integration --- sensors/batteries.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sensors/batteries.yaml b/sensors/batteries.yaml index 2b0c3c6..107ab2e 100644 --- a/sensors/batteries.yaml +++ b/sensors/batteries.yaml @@ -18,3 +18,21 @@ {{ states.sensor.kat_iphone_batt.state }} {%- endif %} icon_template: '{%- if is_state("sensor.kat_iphone_batt", "unknown") %}mdi:battery-unknown{%- elif is_state_attr("device_tracker.katherinestonesiphone", "battery_status", "Charging") %}mdi:battery-charging{%- elif states.device_tracker.katherinestonesiphone.attributes.battery <= 5 %}mdi:battery-outline{%- elif states.device_tracker.katherinestonesiphone.attributes.battery >= 95 %}mdi:battery{% else %}mdi:battery-{{(states.device_tracker.katherinestonesiphone.attributes.battery|float / 10)|round*10}}{%- endif %}' +- platform: mqtt + name: "Front Door Battery" + state_topic: "smartthings/Front Door/battery" +- platform: mqtt + name: "Laundry Door Battery" + state_topic: "smartthings/Laundry Room Door/battery" +- platform: mqtt + name: "Kitchen Smoke Battery" + state_topic: "smartthings/Kitchen Smoke/battery" +- platform: mqtt + name: "Attic Door Battery" + state_topic: "smartthings/Attic Door/battery" +- platform: mqtt + name: "Washer Door Battery" + state_topic: "smartthings/Washer Door/battery" +- platform: mqtt + name: "Back Door Battery" + state_topic: "smartthings/Back Door/battery" \ No newline at end of file From ca5ff69f8487fb50ec8f1f8e5ce8fb39fe5f71c3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:46:55 -0400 Subject: [PATCH 034/106] Thought about moving to a different sensor, but built in config works --- sensors/github.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/sensors/github.yaml b/sensors/github.yaml index 6a695e8..4fd14ac 100644 --- a/sensors/github.yaml +++ b/sensors/github.yaml @@ -3,3 +3,4 @@ repositories: - path: 'thejeffreystone/home-assistant-configuration' + From cb96a56c27bbaa9faeb70498a0e7e008c742fd39 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:47:17 -0400 Subject: [PATCH 035/106] Trying built in speedtest integration again --- sensors/speedtest.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/sensors/speedtest.yaml b/sensors/speedtest.yaml index f9ffb4b..796933a 100644 --- a/sensors/speedtest.yaml +++ b/sensors/speedtest.yaml @@ -1,14 +1,10 @@ -# - platform: speedtest -# minute: 30 -# hour: -# - 0 -# - 6 -# - 12 -# - 18 -# monitored_conditions: -# - ping -# - download -# - upload +- platform: speedtest + scan_interval: + hours: 6 + monitored_conditions: + - ping + - download + - upload - platform: mqtt name: "network down" state_topic: "house/speedtest/down" From 830726c3d6f44ed0c6564b35d39ed5fa6ebb2e8f Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:47:51 -0400 Subject: [PATCH 036/106] Added history stats for more interesting tweets --- sensors/house.yaml | 108 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/sensors/house.yaml b/sensors/house.yaml index f7467c7..088a088 100644 --- a/sensors/house.yaml +++ b/sensors/house.yaml @@ -1,4 +1,110 @@ - platform: mqtt name: "Washer Status" state_topic: "house/washer/status" - +- platform: history_stats + name: Speech time + entity_id: media_player.hass_speker + state: 'playing' + type: time + end: '{{ now() }}' + duration: + hours: 24 +- platform: template + sensors: + sensor_count: + friendly_name: 'Number of Sensors' + entity_id: [] + value_template: > + {%- set domains = ['sensor'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + automation_count: + friendly_name: 'Number of Automations' + entity_id: [] + value_template: > + {%- set domains = ['automation'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + script_count: + friendly_name: 'Number of Scripts' + entity_id: [] + value_template: > + {%- set domains = ['script'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + binary_sensor_count: + friendly_name: 'Number of Binary Sensors' + entity_id: [] + value_template: > + {%- set domains = ['binary_sensor'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + tracker_count: + friendly_name: 'Number of Devices' + entity_id: [] + value_template: > + {%- set domains = ['device_tracker'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + lights_count: + friendly_name: 'Number of Lights' + entity_id: [] + value_template: > + {%- set domains = ['light'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} + protect_count: + friendly_name: 'Number of Smoke Detectors' + entity_id: [] + value_template: > + {% if states('group.protects') == 'on' %} + {% for e in states.group.protects.attributes.entity_id if states(e) == 'on' %} + {% if loop.last %} + {{ loop.index }} + {% endif %} + {%- endfor -%} + {% else %} + 0 + {% endif %} + camera_count: + friendly_name: 'Number of online Cameras' + entity_id: [] + value_template: > + {%- set domains = ['camera'] -%} + {%- for domain in domains -%} + {%- for item in states[domain] -%} + {% if loop.first %} + {{loop.length}} + {% endif %} + {%- endfor -%} + {%- endfor -%} \ No newline at end of file From b3e5b02515bda5ba33c950048ba3a53c2f271220 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 07:52:51 -0400 Subject: [PATCH 037/106] Update README.md Minor Edits --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4a7fb2a..57652d7 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ This is V4 of my config. #### General Information about Anchorage House -Hassbian is the flavor of Home Assistant powering Anchorage House. Currently it is running on a RaspberryPi 3. I also have a Ubuntu Server that handles running some other things like my 433mhz data collection, and Splunk for Home Assistant data analytics. And Smartthings is currently is used as a dumb hub handling most of the zwave and zigbee devices. +Hassbian is the flavor of Home Assistant powering Anchorage House. Currently it is running on a RaspberryPi 3. I also have a Ubuntu Server that handles running some other things like my 433mhz data collection, and Splunk for Home Assistant data analytics. And Smartthings is currently used as a dumb hub handling most of the zwave and zigbee devices. The old configurations are stored in branches for anyone that wants to see the previous iterations. However, the only branch guaranteed to work with the current version of Home Assistant is master. -Read about the continuing work to automate **everything** over on my [blog](https://medium.com/@thejeffreystone). But be warned, it really hasn't been updated in a while. Feel free to reachout if you have questions. I love this stuff. +Read about the continuing work to automate **everything** over on my [blog](http://www.jeffreystone.net). Feel free to reachout if you have questions. I love this stuff. One last thing. Everything in this configuration is a combination of the things I want out of a home automation system flavored with the inspiration from other using Home Assistant. In some cases I took someone else's idea and made it my own, or I just completely stole it. So I would be remiss if I didn't acknowledge those that inpired this journey. If you like what you see here, please checkout their configs as well. I owe them thanks for sharing their work. @@ -31,6 +31,7 @@ One last thing. Everything in this configuration is a combination of the things None of the following links are affiliate links, and are included merely as reference. * Apple Devices (Macbooks, Mac Mini, iPhones, iPads) +* Google Home Hub * [Ecobee Thermostat](https://www.ecobee.com/) * [Amazon Echo Dot](http://a.co/7VYHqvw) * Amazon Echo Gen 2 @@ -70,4 +71,4 @@ None of the following links are affiliate links, and are included merely as refe * [RTL_433](https://github.com/merbanan/rtl_433) * Cloudflare for SSL and DNS * Splunk -* Various other services and APIs \ No newline at end of file +* Various other services and APIs From 8b05e5c2cd76f734e39d233d60a06cc9cbf176b4 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 11 Jul 2019 21:28:21 -0400 Subject: [PATCH 038/106] Updated ignored --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8dbb75a..e15d22f 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,6 @@ zones.yaml sensors/location.yaml google_calendars.yaml packages/events.yaml -packages/presence.yaml \ No newline at end of file +packages/presence.yaml +known_devices.yaml-old.yaml +packages/zigbe2mqtt.yaml \ No newline at end of file From a9956c9974268a7ee16034b2ad3ed2f001152f87 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:31:13 -0400 Subject: [PATCH 039/106] Added new ignoreables --- .gitignore | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index e15d22f..d3b5ab3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Ignore everything explicitly * + # Whitelist files/folders with !, these will not be ignored. !*.yaml !.gitignore @@ -26,36 +27,7 @@ tts/ deps/ hadashboards/ intents/ - -# Ignore these dot and conf files -*.conf -*.log -*.db -*.xml -*.sqlite -*.txt -.HA_VERSION -*DS_Store -._* -.uuid -eero.session -eero_tracker_instantiate.py -Icon -.dropbox -.google.token -.homekit.state -.spotify-token-cache - - -# Ensure these YAML files are ignored, otherwise your secret data/credentials will leak. -ip_bans.yaml secrets.yaml -known_devices.yaml -entity_registry.yaml -zones.yaml -sensors/location.yaml +ip_bans.yaml +._* google_calendars.yaml -packages/events.yaml -packages/presence.yaml -known_devices.yaml-old.yaml -packages/zigbe2mqtt.yaml \ No newline at end of file From 48dbc225c2605015567909bb6b9849135eb97808 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:32:25 -0400 Subject: [PATCH 040/106] Adding my own simple Jarvis --- packages/jarvis.yaml | 55 +++++++++++++++++++++++++++++ templates/jarvis_confirmations.yaml | 31 ++++++++++++++++ templates/jarvis_interuptions.yaml | 23 ++++++++++++ templates/jarvis_issue.yaml | 23 ++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 packages/jarvis.yaml create mode 100644 templates/jarvis_confirmations.yaml create mode 100644 templates/jarvis_interuptions.yaml create mode 100644 templates/jarvis_issue.yaml diff --git a/packages/jarvis.yaml b/packages/jarvis.yaml new file mode 100644 index 0000000..68f0c19 --- /dev/null +++ b/packages/jarvis.yaml @@ -0,0 +1,55 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 07/09/2019 +# @package : Jarvis +# @description : Brining some Jarvis to Home Assistant +############################################################################### + +automation: +- id: guest_mode_feedback + alias: Guest Mode Audio Feedback + trigger: + - platform: state + entity_id: + - input_boolean.guest_mode + from: 'off' + to: 'on' + action: + - service: script.jarvis_voice + data_template: + message: > + {{ [ + "Guest Mode has been enabled.", + "I have switched to the system to guest mode.", + "I have enabled guest mode. ", + "Guest Mode is on." + ] | random }} + +script: + activate_house_party_protocol: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_confirmations.yaml + - delay: + seconds: 3 + - service: scene.turn_on + entity_id: scene.house_party_protocol + - service: script.jarvis_voice + data_template: + message: > + {{ [ + "Anchorage House has been configured for a House Party.", + "Incense has been turned on.", + "I have enabled house party protocol." + ] | random }} + + activate_guest_mode: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_confirmations.yaml + - delay: + seconds: 3 + - service: input_boolean.turn_on + entity_id: input_boolean.guest_mode \ No newline at end of file diff --git a/templates/jarvis_confirmations.yaml b/templates/jarvis_confirmations.yaml new file mode 100644 index 0000000..95b4be1 --- /dev/null +++ b/templates/jarvis_confirmations.yaml @@ -0,0 +1,31 @@ + > + {% macro getConfirmation() %} + {{ [ + "OK.", + "Sure.", + "If you insist.", + "I can do that.", + "Leave it to me.", + "Consider it done.", + "As you wish.", + "By your command.", + "Affirmative.", + "No Problem.", + "I think I can handle that.", + "Working on it now." + ] | random }} + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getConfirmation() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jarvis_interuptions.yaml b/templates/jarvis_interuptions.yaml new file mode 100644 index 0000000..c579511 --- /dev/null +++ b/templates/jarvis_interuptions.yaml @@ -0,0 +1,23 @@ + > + {% macro getInteruption() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getInteruption() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jarvis_issue.yaml b/templates/jarvis_issue.yaml new file mode 100644 index 0000000..838d728 --- /dev/null +++ b/templates/jarvis_issue.yaml @@ -0,0 +1,23 @@ + > + {% macro getIssue() %} + {{ [ + "I have detected an issue!", + "We have a problem!", + "You might not like this.", + "There is something that needs your attention." + ] | random }} + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIssue() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file From c86e73561e28c465d70a264a37660b175e70fab4 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:32:55 -0400 Subject: [PATCH 041/106] Changed blog address --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 57652d7..0738833 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ This is V4 of my config. #### General Information about Anchorage House -Hassbian is the flavor of Home Assistant powering Anchorage House. Currently it is running on a RaspberryPi 3. I also have a Ubuntu Server that handles running some other things like my 433mhz data collection, and Splunk for Home Assistant data analytics. And Smartthings is currently used as a dumb hub handling most of the zwave and zigbee devices. +Hassbian is the flavor of Home Assistant powering Anchorage House. Currently it is running on a RaspberryPi 3. I also have a Ubuntu Server that handles running some other things like my 433mhz data collection, and Splunk for Home Assistant data analytics. And Smartthings is currently is used as a dumb hub handling most of the zwave and zigbee devices. The old configurations are stored in branches for anyone that wants to see the previous iterations. However, the only branch guaranteed to work with the current version of Home Assistant is master. -Read about the continuing work to automate **everything** over on my [blog](http://www.jeffreystone.net). Feel free to reachout if you have questions. I love this stuff. +Read about the continuing work to automate **everything** over on my [blog](https://medium.com/@thejeffreystone). But be warned, it really hasn't been updated in a while. Feel free to reachout if you have questions. I love this stuff. One last thing. Everything in this configuration is a combination of the things I want out of a home automation system flavored with the inspiration from other using Home Assistant. In some cases I took someone else's idea and made it my own, or I just completely stole it. So I would be remiss if I didn't acknowledge those that inpired this journey. If you like what you see here, please checkout their configs as well. I owe them thanks for sharing their work. @@ -31,8 +31,7 @@ One last thing. Everything in this configuration is a combination of the things None of the following links are affiliate links, and are included merely as reference. * Apple Devices (Macbooks, Mac Mini, iPhones, iPads) -* Google Home Hub -* [Ecobee Thermostat](https://www.ecobee.com/) +* [Honeywell Wifi Thermostat](http://a.co/cqvrljP) * [Amazon Echo Dot](http://a.co/7VYHqvw) * Amazon Echo Gen 2 * [Smartthings](http://a.co/2xWyXF5) @@ -71,4 +70,4 @@ None of the following links are affiliate links, and are included merely as refe * [RTL_433](https://github.com/merbanan/rtl_433) * Cloudflare for SSL and DNS * Splunk -* Various other services and APIs +* Various other services and APIs \ No newline at end of file From 1ba86da318c415c033106eb80a9480604309e5c9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:34:15 -0400 Subject: [PATCH 042/106] Minor tweeks to work better with Amazon Polly --- templates/morning_report.yaml | 5 ++-- templates/nightly_report.yaml | 11 +++++--- templates/prebed_routing.yaml | 50 +++++++++++++++++++++++++++++++++++ templates/skylar_morning.yaml | 16 ++++++----- 4 files changed, 70 insertions(+), 12 deletions(-) create mode 100644 templates/prebed_routing.yaml diff --git a/templates/morning_report.yaml b/templates/morning_report.yaml index d3930eb..dda68f7 100644 --- a/templates/morning_report.yaml +++ b/templates/morning_report.yaml @@ -2,10 +2,11 @@ {% macro getGreeting() %} {{ [ "Good morning Anchorage House. Rise and Shine. ", "Good morning everyone. ", - "Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake. umm, someone might want to take care, ok, moving on.", + "Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", "Good morning. The early bird gets the worm.", "Good morning from the bridge.", - "I hope I am not waking you, but I think this would be a good time for the morning report." + "Pardom the interuption.", + "I hope I am not interupting, but I think this would be a good time for the morning report." ] | random }} {% if is_state("input_boolean.guest_mode", "on") %} {{ [ "And a special welcome to our guests. ", diff --git a/templates/nightly_report.yaml b/templates/nightly_report.yaml index 201f535..ddeec9e 100644 --- a/templates/nightly_report.yaml +++ b/templates/nightly_report.yaml @@ -1,12 +1,12 @@ > {% macro getSnark() %} {{ [ "Good evening, ", - "Before we shut this party down, ", + "Pardon the interuption, ", "Good Evening Anchorage House, " ] | random }} {{ [ "I thought you might like to know. ", - "I might have some bad news for you.", - "Just one more thing." + "Here is the nightly report.", + "Before I call it a day I wanted to let you know," ] | random }} {% endmacro %} {% macro getForecast() %} @@ -14,7 +14,10 @@ {% endmacro %} {% macro getTrashDay() %} {% if is_state("sensor.weekday", "mon") %} - Don't forget Tomorrow is trash day! + {{ [ "Don't forget tomorrow is Trash Day. ", + "I advise you move the trash cans to the curb for the weekly pickup. ", + " The trash and recycle should go out" + ] | random }} {% endif %} {% endmacro %} {% macro getBirthdays() %} diff --git a/templates/prebed_routing.yaml b/templates/prebed_routing.yaml new file mode 100644 index 0000000..aa24037 --- /dev/null +++ b/templates/prebed_routing.yaml @@ -0,0 +1,50 @@ + > + {% macro getForecast() %} + The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain. + {% endmacro %} + {% macro getTrashDay() %} + {% if is_state("sensor.weekday", "mon") %} + Tomorrow is trash day! + {% endif %} + {% endmacro %} + {% macro getBirthdays() %} + {% if states.sensor.birthday_skylar.state | int < 2 %} + Tomorrow is Skylar's Birthday. + {% endif %} + {% if states.sensor.birthday_jeff.state | int < 2 %} + Tomorrow is Jeff's Birthday. + {% endif %} + {% if states.sensor.birthday_kat.state | int < 2 %} + Tomorrow is Katherine's Birthday. + {% endif %} + {% if states.sensor.anniversary_our_wedding.state | int < 2 %} + Tomorrow is Jeff and Katherine's Wedding Anniversary. + {% endif %} + {% endmacro %} + {% macro getHolidays() %} + {% if states.sensor.holiday_halloween.state | int < 2 %} + Tomorrow is Halloween. Hope you have picked out a costume. + {% endif %} + {% if states.sensor.holiday_christmas.state | int < 2 %} + Tomorrow is Christmas. It's practically here! + {% endif %} + {% endmacro %} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + It is {{ now().strftime("%I:%M %p") }}. + {{ getForecast() }} + {{ getTrashDay() }} + {{ getBirthdays() }} + {{ getHolidays() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/skylar_morning.yaml b/templates/skylar_morning.yaml index 8e19141..99b9edd 100644 --- a/templates/skylar_morning.yaml +++ b/templates/skylar_morning.yaml @@ -1,16 +1,20 @@ > {% macro getIntro() %} - Skylar. - {{ [ "This is your friendly neighborhood smart home ", - "This is your digital life mate ", - "This is your cruise director ", - ] | random }} with your morning announcements. + + {{ [ "Pardom me, Skylar,, ", + "Good morning Skylar, This is your digital life mate, Jarvis ", + "This is your cruise director with your morning announcements.", + ] | random }} {% endmacro %} {% macro getDressed() %} {% if is_state("sensor.birthday_skylar", "0") %} First, Happy Birthday Skylar! Second, even birthday boys have to get dressed. So get to it. {% else %} - It is time to get dressed. + If you haven't gotten dressed, + {{ [ "It is time to get dressed. ", + "It is time to put some real clothes on. ", + "it is now time to change your underwear.", + ] | random }} {% endif %} {% endmacro %} {% macro getSchoolDay() %} From db0797f851a6ff837c451233fce15933db637ecb Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:34:49 -0400 Subject: [PATCH 043/106] Disabled --- packages/zigbe2mqtt.yaml | 171 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 packages/zigbe2mqtt.yaml diff --git a/packages/zigbe2mqtt.yaml b/packages/zigbe2mqtt.yaml new file mode 100644 index 0000000..646b205 --- /dev/null +++ b/packages/zigbe2mqtt.yaml @@ -0,0 +1,171 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 02/19/2019 +# @package : Zigbee2mqtt +# @description : Zigbee2mqtt Config +############################################################################### + + + +# Group +group: + zigbee_group: + view: false + control: hidden + name: Zigbee2mqtt + entities: + - input_boolean.zigbee_permit_join + - timer.zigbee_permit_join + - sensor.zigbee2mqtt_bridge_state + - switch.zigbee2mqtt_main_join + - automation.enable_zigbee_joining + - automation.disable_zigbee_joining + - automation.disable_zigbee_joining_by_timer + - input_select.zigbee2mqtt_log_level + - automation.zigbee2mqtt_log_level + +# Input select for Zigbee2mqtt debug level +input_select: + zigbee2mqtt_log_level: + name: Zigbee2mqtt Log Level + options: + - debug + - info + - warn + - error + initial: info + icon: mdi:format-list-bulleted + +# Input boolean for enabling/disabling joining +input_boolean: + zigbee_permit_join: + name: Allow devices to join + initial: off + icon: mdi:cellphone-wireless + +# Timer for joining time remaining (120 sec = 2 min) +timer: + zigbee_permit_join: + name: Time remaining + duration: 120 + +# Sensor for monitoring the bridge state +sensor: + - platform: mqtt + name: Zigbee2mqtt Bridge state + state_topic: "zigbee2mqtt/bridge/state" + icon: mdi:router-wireless + - platform: "mqtt" + name: "towerlight" + state_topic: "zigbee2mqtt/tower lamp" + availability_topic: "zigbee2mqtt/bridge/state" + unit_of_measurement: "-" + value_template: "{{ value_json.linkquality }}" + - platform: "mqtt" + state_topic: "zigbee2mqtt/rainbow light" + availability_topic: "zigbee2mqtt/bridge/state" + unit_of_measurement: "-" + value_template: "{{ value_json.linkquality }}" + +# Switch for enabling joining +switch: + - platform: mqtt + name: "Zigbee2mqtt Main join" + state_topic: "zigbee2mqtt/bridge/config/permit_join" + command_topic: "zigbee2mqtt/bridge/config/permit_join" + payload_on: "true" + payload_off: "false" + - platform: "mqtt" + name: "rainbowlight" + state_topic: "zigbee2mqtt/rainbow light" + availability_topic: "zigbee2mqtt/bridge/state" + payload_off: "OFF" + payload_on: "ON" + value_template: "{{ value_json.state }}" + command_topic: "zigbee2mqtt/rainbow light/set" + +# Automations +automation: + - alias: Zigbee2mqtt Log Level + initial_state: 'on' + trigger: + - platform: state + entity_id: input_select.zigbee2mqtt_log_level + to: debug + - platform: state + entity_id: input_select.zigbee2mqtt_log_level + to: warn + - platform: state + entity_id: input_select.zigbee2mqtt_log_level + to: error + - platform: state + entity_id: input_select.zigbee2mqtt_log_level + to: info + action: + - service: mqtt.publish + data: + payload_template: '{{ states(''input_select.zigbee2mqtt_log_level'') }}' + topic: zigbee2mqtt/bridge/config/log_level + + - id: enable_zigbee_join + alias: Enable Zigbee joining + hide_entity: true + trigger: + platform: state + entity_id: input_boolean.zigbee_permit_join + to: 'on' + action: + - service: mqtt.publish + data: + topic: zigbee2mqtt/bridge/config/permit_join + payload: 'true' + - service: timer.start + data: + entity_id: timer.zigbee_permit_join + + - id: disable_zigbee_join + alias: Disable Zigbee joining + hide_entity: true + trigger: + - entity_id: input_boolean.zigbee_permit_join + platform: state + to: 'off' + action: + - data: + payload: 'false' + topic: zigbee2mqtt/bridge/config/permit_join + service: mqtt.publish + - data: + entity_id: timer.zigbee_permit_join + service: timer.cancel + + - id: disable_zigbee_join_timer + alias: Disable Zigbee joining by timer + hide_entity: true + trigger: + - platform: event + event_type: timer.finished + event_data: + entity_id: timer.zigbee_permit_join + action: + - service: mqtt.publish + data: + topic: zigbee2mqtt/bridge/config/permit_join + payload: 'false' + - service: input_boolean.turn_off + data: + entity_id: input_boolean.zigbee_permit_join + +light: + - platform: "mqtt" + name: "towerlamp" + state_topic: "zigbee2mqtt/tower lamp" + availability_topic: "zigbee2mqtt/bridge/state" + brightness: true + color_temp: true + xy: true + schema: "json" + command_topic: "zigbee2mqtt/tower lamp/set" + + + From 3b924482f338c9b7751366c2b63b6244354ee543 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:35:11 -0400 Subject: [PATCH 044/106] Migrating to Amazon Polly --- packages/announcements.yaml | 19 +++- packages/disney.yaml | 4 +- packages/events.yaml | 165 +++++++++++++++++++++++++++++++ packages/notify.yaml | 75 ++++++++++++-- packages/presence.yaml | 109 ++++++++++++++++++++ packages/security.yaml | 85 +++------------- packages/space.yaml | 6 +- packages/weather_alerts_nws.yaml | 8 +- 8 files changed, 385 insertions(+), 86 deletions(-) create mode 100644 packages/events.yaml create mode 100644 packages/presence.yaml diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 1dcd419..fadcc2c 100644 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -142,5 +142,22 @@ automation: - service: script.turn_on entity_id: script.weather_report - service: script.voice_reports_off - + - id: guest_mode_feedback + alias: Guest Mode Audio Feedback + trigger: + - platform: state + entity_id: + - input_boolean.guest_mode + from: 'off' + to: 'on' + action: + - service: script.jarvis_voice + data_template: + message: > + {{ [ + "Guest Mode has been enabled as you requested.", + "I have switched to the system to guest mode", + "I have enabled guest mode. ", + "System Guest Mode has been enabled." + ] | random }} diff --git a/packages/disney.yaml b/packages/disney.yaml index c85d77b..0d1e5fd 100644 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -1,8 +1,8 @@ ############################################################################### # @author : Jeffrey Stone # @date : 03/13/2019 -# @package : Disney -# @description : A little Imaginering to bring disney into our home. +# @package : Security +# @description : Everything related to security functions. ############################################################################### input_boolean: diff --git a/packages/events.yaml b/packages/events.yaml new file mode 100644 index 0000000..6a78521 --- /dev/null +++ b/packages/events.yaml @@ -0,0 +1,165 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 02/19/2019 +# @package : Events +# @description : Special Events. +############################################################################### +automation: + - id: refresh_special_event_sensors + alias: Refresh special event sensors + initial_state: true + trigger: + - platform: time + at: '00:00:01' + - platform: homeassistant + event: start + action: + - service: python_script.special_events + data: + name: Skylar + type: birthday + date: 26/02/2014 + - service: python_script.special_events + data: + name: Jeff + type: birthday + date: 02/09/1975 + - service: python_script.special_events + data: + name: Kat + type: birthday + date: 18/09/1978 + - service: python_script.special_events + data: + name: Our wedding + type: anniversary + date: 28/04/2001 + - service: python_script.special_events + data: + name: Christmas + type: holiday + date: 25/12/2001 + - service: python_script.special_events + data: + name: Halloween + type: holiday + date: 31/10/2001 + - service: python_script.special_events + data: + name: Roadtrip + type: trip + date: 30/08/2019 + - service: python_script.special_events + data: + name: Disney World + type: trip + date: 01/02/2020 + - service: python_script.special_events + data: + name: Camping + type: trip + date: 09/10/2019 + + - id: first_day_info + alias: First Day Info + initial_state: true + trigger: + - platform: time + at: '00:10:00' + condition: + - condition: template + value_template: > + {% set day=states("sensor.date").split('-')[2] | int %} + {%- if day == 1 -%} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_github + data_template: + message: >- + "Its a new month, so this is a good time to remind you that I am powered by @homeassistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" + + - id: tweet_new_ha_version + alias: Tweet New HA Version + trigger: + - platform: state + entity_id: updater.updater + action: + - service: script.twitter_new_ha + + - id: tweet_some_snark + alias: Tweet Some Snark + initial_state: true + trigger: + - platform: time + at: '08:00:00' + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_snark + + - id: bot_info + alias: Bot Info + initial_state: true + trigger: + - platform: time + at: '10:00:00' + condition: + - condition: template + value_template: > + {% set day=states("sensor.date").split('-')[2] | int %} + {%- if day == 15 -%} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notift + data_template: + message: >- + "This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" + + - id: rex_manning_day_tweet_1 + alias: Rex Manning Day Tweet One + initial_state: true + trigger: + - platform: time + at: '08:00:00' + condition: + - condition: state + entity_id: calendar.anchorage_holidays + state: "on" + - condition: template + value_template: > + {%- set event=states.calendar.anchorage_holidays.attributes.message %} + {%- if event == 'Rex Manning Day' %} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notify + data_template: + message: >- + "Happy Rex Manning Day! https://www.youtube.com/watch?v=30fw5My1QJM #damntheman #savetheempire" + + - id: rex_manning_day_tweet_2 + alias: Rex Manning Day Tweet Two + initial_state: true + trigger: + - platform: time + at: '13:00:00' + condition: + - condition: state + entity_id: calendar.anchorage_holidays + state: "on" + - condition: template + value_template: > + {%- set event=states.calendar.anchorage_holidays.attributes.message %} + {%- if event == 'Rex Manning Day' %} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notify + data_template: + message: >- + "We mustn't dwell. No, not today. We can't. Not on Rex Manning day! https://www.youtube.com/watch?v=szvt8iWJ0oo #damntheman #savetheempire" diff --git a/packages/notify.yaml b/packages/notify.yaml index 9902dd2..ee5eb9f 100644 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -15,6 +15,13 @@ tts: cache: true cache_dir: /tmp/tts time_memory: 300 + - platform: amazon_polly + aws_access_key_id: !secret aws_key + aws_secret_access_key: !secret aws_secret + region_name: 'us-east-1' + text_type: ssml + voice: Brian + cache: True notify: - platform: ios @@ -104,6 +111,17 @@ script: message: > {{ message }} + jarvis_alert: + sequence: + - service: tts.amazon_polly_say + data_template: + entity_id: media_player.hass_speaker + message: >- + + {{ message }} + + cache: true + ############################################################################### # Voice Notify @@ -131,6 +149,32 @@ script: message: > {{message }} + jarvis_voice: + sequence: + - condition: template + value_template: '{{ states.input_boolean.audible_notifications.state == "on" }}' + - condition: state + entity_id: sensor.family_status + state: 'Home' + - condition: state + entity_id: input_boolean.vacation_mode + state: 'off' + - wait_template: >- + {{ not is_state('media_player.hass_speaker', 'playing') }} + - service: tts.amazon_polly_say + data_template: + entity_id: media_player.hass_speaker + # entity_id: > + # {% if states.input_boolean.audible_notifications.state == 'on' %} + # media_player.hass_speaker + # {% else %} + # media_player.googlehome0715, media_player.googlehomehub3492 + # {% endif %} + message: >- + + {{ message }} + + cache: true ############################################################################### # Twitter @@ -185,7 +229,7 @@ script: ############################################################################### morning_report: sequence: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/morning_report.yaml @@ -195,7 +239,7 @@ script: ############################################################################### skylar_morning_greeting: sequence: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/skylar_morning.yaml @@ -204,7 +248,13 @@ script: ############################################################################### nightly_report: sequence: - - service: script.voice_notify + - service: script.jarvis_voice + data_template: + message: !include ../templates/nightly_report.yaml + + test_nightly_report: + sequence: + - service: script.jarvis_voice data_template: message: !include ../templates/nightly_report.yaml @@ -213,16 +263,25 @@ script: ############################################################################### weather_report: sequence: - - service: script.voice_notify + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_confirmations.yaml + - delay: + seconds: 3 + - service: script.jarvis_voice data_template: message: !include ../templates/weather_report.yaml + - delay: + minutes: 5 + - service: scriot.turn_off + entity_id: script.weather_report ############################################################################### # Traffic Report ############################################################################### traffic_report: sequence: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/traffic_report.yaml @@ -231,7 +290,7 @@ script: ############################################################################### jeff_eta_report: sequence: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/jeff_eta.yaml @@ -240,7 +299,7 @@ script: ############################################################################### kat_eta_report: sequence: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/kat_eta.yaml @@ -249,7 +308,7 @@ script: ############################################################################### prebed_routine: sequence: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/skylar_night.yaml # message: > diff --git a/packages/presence.yaml b/packages/presence.yaml new file mode 100644 index 0000000..66bc451 --- /dev/null +++ b/packages/presence.yaml @@ -0,0 +1,109 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 02/19/2019 +# @package : Presence +# @description : A Collection of Presence Related Trackers and Sensors +############################################################################### + +sensor: + - platform: template + sensors: + jeff_location: + friendly_name: "Jeff's Current Location" + unit_of_measurement: '' + value_template: >- + {%- if is_state('device_tracker.jeffreystonesiphone', 'not_home') %} + {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} + Flue Network + {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} + Flue Network + {% else %} + Lost + {%- endif %} + {% elif is_state('device_tracker.jeffreystonesiphone', 'Sprouts') %} + Grocery Store + {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger Grayson') %} + Grocery Store + {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger Snellville') %} + Grocery Store + {% elif is_state('device_tracker.jeffreystonesiphone', 'Home Depot') %} + Home Improvement Store + {% elif is_state('device_tracker.jeffreystonesiphone', 'Lowes') %} + Home Improvement Store + {% elif is_state('device_tracker.jeffreystonesiphone', 'Walmart') %} + Super Store + {% elif is_state('device_tracker.jeffreystonesiphone', 'Target') %} + Super Store + {% else %} + {{ states.device_tracker.jeffreystonesiphone.state }} + {%- endif %} + - platform: template + sensors: + skylar_location: + friendly_name: "Skylar's Current Location" + unit_of_measurement: '' + value_template: >- + {%- if is_state('device_tracker.jeffreystonesiphone', 'home') and is_state('device_tracker.katherinestonesiphone', 'home')%} + home + {% else %} + Mortal Peril + {%- endif %} + - platform: template + sensors: + kat_location: + friendly_name: "Kat's Current Location" + unit_of_measurement: '' + value_template: >- + {%- if is_state('device_tracker.katherinestonesiphone', 'not_home') %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Flue Network + {% elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Flue Network + {% else %} + Lost + {%- endif %} + {% elif is_state('device_tracker.katherinestonesiphone', 'Sprouts') %} + Grocery Store + {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger Grayson') %} + Grocery Store + {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger Snellville') %} + Grocery Store + {% elif is_state('device_tracker.katherinestonesiphone', 'Home Depot') %} + Home Improvement Store + {% elif is_state('device_tracker.katherinestonesiphone', 'Lowes') %} + Home Improvement Store + {% elif is_state('device_tracker.katherinestonesiphone', 'Walmart') %} + Super Store + {% elif is_state('device_tracker.katherinestonesiphone', 'Target') %} + Super Store + {% else %} + {{ states.device_tracker.katherinestonesiphone.state }} + {%- endif %} + - platform: mqtt + name: "Family Status" + state_topic: "house/family/status" + payload_available: "online" + payload_not_available: "offline" + - platform: template + sensors: + jeff_home: + value_template: >- + {{ is_state('device_tracker.jeffreystonesiphone', 'home') + or is_state('device_tracker.hass_jeffsiphone', 'home') + or is_state('device_tracker.life360_jeffrey_stone', 'home') }} + - platform: template + sensors: + kat_home: + value_template: >- + {{ is_state('device_tracker.katherinestonesiphone', 'home') + or is_state('device_tracker.life360_kat_stone', 'home') }} + - platform: template + sensors: + family_home: + value_template: >- + {{ is_state('device_tracker.jeffreystonesiphone', 'home') + or is_state('device_tracker.hass_jeffsiphone', 'home') + or is_state('device_tracker.life360_jeffrey_stone', 'home') + or is_state('device_tracker.katherinestonesiphone', 'home') + or is_state('device_tracker.life360_kat_stone', 'home') + or is_state('sensor.family_status', 'Home') }} diff --git a/packages/security.yaml b/packages/security.yaml index e29e853..f083093 100644 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -120,38 +120,13 @@ automation: - id: door_chime alias: Door Chine trigger: - - entity_id: binary_sensor.front_door_contact_2 + - platform: state + entity_id: + - binary_sensor.front_door_contact_2 + - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.attic_door_contact_2 + - binary_sensor.back_door_contact_2 from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.front_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.laundry_room_door_contact_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.laundry_room_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.attic_door_contact_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.attic_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.back_door_contact_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.back_door_contact_2 - from: 'on' - platform: state - to: 'off' condition: - condition: state entity_id: input_boolean.audible_notifications @@ -166,51 +141,21 @@ automation: - id: security_breach_door alias: Security Breach Doors trigger: - - entity_id: binary_sensor.front_door_contact_2 + - platform: state + entity_id: + - binary_sensor.front_door_contact_2 + - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.attic_door_contact_2 + - binary_sensor.back_door_contact_2 from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.front_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.back_door_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.back_door_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.laundry_room_door_contact_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.laundry_room_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.side_door_contact_2 - from: 'off' - platform: state - to: 'on' - - entity_id: binary_sensor.side_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.attic_door_contact_2 - from: 'on' - platform: state - to: 'off' - - entity_id: binary_sensor.garage_door - from: 'on' - platform: state - to: 'off' condition: - condition: state entity_id: input_boolean.sentry_mode state: 'on' action: + - service: script.jarvis_notify + data_template: + message: "The {{ trigger.to_state.attributes.friendly_name }} has been opened." - service: input_boolean.turn_on entity_id: input_boolean.security_issue initial_state: true diff --git a/packages/space.yaml b/packages/space.yaml index 05d8651..cc62d9e 100644 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -81,8 +81,12 @@ automation: - binary_sensor.iss to: 'on' from: 'off' + condition: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' action: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: !include ../templates/iss_report.yaml diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index 5e9b6d8..0a065be 100644 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -118,7 +118,7 @@ automation: - condition: template value_template: "{{ (('Severe' in states.sensor.nws_alerts.attributes.title) or ('Thunderstorm' in states.sensor.nws_alerts.attributes.title)) and 'Warning' in states.sensor.nws_alerts.attributes.title }}" action: - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: > {% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %} @@ -140,7 +140,7 @@ automation: "The weather outside is getting intense, so I just made a weather announcement.", "Anchorage House monitors the NWS using #HomeAssistant just for these occasions. Thanks for the heads up @NWSAtlanta " ] | random }}' - delay: '00:00:15' - - service: script.voice_notify + - service: script.jarvis_voice data_template: message: > {% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %} @@ -170,7 +170,7 @@ automation: - condition: template value_template: "{{ 'Tornado Warning' in states.sensor.nws_alerts.attributes.title}}" action: - - service: script.alert_notify + - service: script.jarvis_alert data_template: message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area." - service: script.twitter_notify @@ -179,7 +179,7 @@ automation: "Anchorage House is heading to the closet because the NWS just issued a tornado warning for our area.", "I just activated the internal Tornado Alarm at the request of the NWS. Thanks for the heads up @NWSAtlanta " ] | random }}' - delay: '00:00:15' - - service: script.alert_notify + - service: script.jarvis_alert data_template: message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area." - delay: '00:00:15' From 057e25c3ba310e6c6d593736c460e857b4fcc433 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 12 Jul 2019 16:35:36 -0400 Subject: [PATCH 045/106] Minor Tweeks --- .gitignore | 2 ++ automations.yaml | 6 +++--- scripts.yaml | 2 +- sensors/github.yaml | 9 ++++++++- sensors/house.yaml | 44 ++++++++++++++++++++++++++++++++++++++++-- sensors/speedtest.yaml | 16 +++++++-------- 6 files changed, 64 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index d3b5ab3..f534185 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ secrets.yaml ip_bans.yaml ._* google_calendars.yaml +known_devices* +zones.yaml diff --git a/automations.yaml b/automations.yaml index 9169f09..3b3ae69 100644 --- a/automations.yaml +++ b/automations.yaml @@ -721,8 +721,8 @@ alias: Kat Pill Reminder initial_state: true trigger: - - at: 07:35:00 - platform: time + - platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.kat_pill_reminder', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" condition: - condition: state entity_id: input_boolean.text_notify_kat @@ -751,4 +751,4 @@ action: - service: script.twitter_new_ha - service: input_boolean.turn_off - entity_id: input_boolean.new_ha_announcement \ No newline at end of file + entity_id: input_boolean.new_ha_announcement diff --git a/scripts.yaml b/scripts.yaml index 89205c8..faa596f 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -343,4 +343,4 @@ voice_reports_off: - service: input_boolean.turn_off entity_id: input_boolean.play_weather_report - service: script.turn_off - entity_id: script.weather_report \ No newline at end of file + entity_id: script.weather_report diff --git a/sensors/github.yaml b/sensors/github.yaml index 4fd14ac..5600578 100644 --- a/sensors/github.yaml +++ b/sensors/github.yaml @@ -2,5 +2,12 @@ access_token: !secret github_token repositories: - path: 'thejeffreystone/home-assistant-configuration' - +- platform: command_line + command: 'curl https://api.github.com/repos/thejeffreystone/home-assistant-configuration' + name: GitHub Stats + scan_interval: 20000 + value_template: '{{ value_json.name }}' + json_attributes: + - open_issues + - stargazers_count diff --git a/sensors/house.yaml b/sensors/house.yaml index 088a088..28f90c7 100644 --- a/sensors/house.yaml +++ b/sensors/house.yaml @@ -3,12 +3,52 @@ state_topic: "house/washer/status" - platform: history_stats name: Speech time - entity_id: media_player.hass_speker + entity_id: media_player.hass_speaker state: 'playing' type: time end: '{{ now() }}' duration: hours: 24 +- platform: history_stats + name: AppleTV time + entity_id: media_player.apple_tv + state: 'playing' + type: time + end: '{{ now() }}' + duration: + hours: 24 +- platform: history_stats + name: Roku time + entity_id: media_player.bedroom + state: 'playing' + type: time + end: '{{ now() }}' + duration: + hours: 24 +- platform: history_stats + name: Washer Time + entity_id: sensor.washer_status + state: 'running' + type: time + end: '{{ now() }}' + duration: + hours: 24 +- platform: min_max + name: Outside Temp Stats + entity_ids: + - sensor.accurite_back_porch_temperature +- platform: min_max + name: Garage Temp Stats + entity_ids: + - sensor.accurite_garage_temperature +- platform: min_max + name: Inside Temp Stats + entity_ids: + - sensor.craft_room_temperature + - sensor.kitchen_temperature + - sensor.living_room_temperature + - sensor.master_bedroom_temperature + - sensor.skylar_room_temperature - platform: template sensors: sensor_count: @@ -107,4 +147,4 @@ {{loop.length}} {% endif %} {%- endfor -%} - {%- endfor -%} \ No newline at end of file + {%- endfor -%} diff --git a/sensors/speedtest.yaml b/sensors/speedtest.yaml index 796933a..fafb695 100644 --- a/sensors/speedtest.yaml +++ b/sensors/speedtest.yaml @@ -1,13 +1,13 @@ -- platform: speedtest - scan_interval: - hours: 6 - monitored_conditions: - - ping - - download - - upload +#- platform: speedtest +# scan_interval: +# hours: 6 +# monitored_conditions: +# - ping +# - download +# - upload - platform: mqtt name: "network down" state_topic: "house/speedtest/down" - platform: mqtt name: "network up" - state_topic: "house/speedtest/up" \ No newline at end of file + state_topic: "house/speedtest/up" From 70c7bbb6703eab6fbf7e5308bb83e90ef5d589be Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 13 Jul 2019 21:38:53 -0400 Subject: [PATCH 046/106] Too many updates to cover --- alerts/garage_after_dark.yaml | 0 alerts/jeff_bad_traffic_home.yaml | 0 alerts/jeff_heading_home.yaml | 0 alerts/kat_heading_home.yaml | 0 alerts/lockdown_issue.yaml | 0 alerts/unauthorized_access.yaml | 0 automations.yaml | 186 +--------------- binary_sensors/calendar.yaml | 6 +- binary_sensors/doors.yaml | 0 binary_sensors/motion.yaml | 0 configuration.yaml | 10 +- customize.yaml | 0 groups.yaml | 6 + input_boolean.yaml | 45 ++-- input_datetime.yaml | 0 input_select.yaml | 9 - lights/living_room.yaml | 0 packages/announcements.yaml | 151 ++++--------- packages/disney.yaml | 0 packages/events.yaml | 12 +- packages/jarvis.yaml | 30 ++- packages/maintenance.yaml | 0 packages/notify.yaml | 155 ++++++++++--- packages/presence.yaml | 231 ++++++++++++++++++++ packages/security.yaml | 209 ++++++++++++++---- packages/space.yaml | 4 - packages/sysmon.yaml | 0 packages/usps.yaml | 40 ++-- packages/weather_alerts_nws.yaml | 21 +- packages/weekday.yaml | 0 packages/zigbe2mqtt.yaml | 171 --------------- scenes.yaml | 0 scripts.yaml | 178 +++++++-------- sensors/batteries.yaml | 0 sensors/devices.yaml | 59 ----- sensors/finance.yaml | 0 sensors/github.yaml | 0 sensors/google_travel_time.yaml | 0 sensors/house.yaml | 20 +- sensors/power.yaml | 0 sensors/speedtest.yaml | 0 sensors/users.yaml | 0 sensors/weather.yaml | 0 switches/bedroom.yaml | 0 switches/living_room.yaml | 0 switches/notifications.yaml | 0 switches/sonoff.yaml | 0 switches/upstairs.yaml | 0 templates/configuration.yaml | 328 ---------------------------- templates/halloween_countdown.yaml | 27 +++ templates/iss_report.yaml | 7 +- templates/jarvis_confirmations.yaml | 6 +- templates/jarvis_interuptions.yaml | 6 +- templates/jarvis_issue.yaml | 0 templates/jeff_eta.yaml | 37 +++- templates/jeff_heading_home.yaml | 24 ++ templates/jeff_home_annc.yaml | 33 +++ templates/kat_arrived_at_work.yaml | 26 +++ templates/kat_eta.yaml | 48 +++- templates/kat_heading_home.yaml | 24 ++ templates/kat_home_annc.yaml | 33 +++ templates/morning_report.yaml | 0 templates/nightly_report.yaml | 0 templates/prebed_routing.yaml | 0 templates/security_report.yaml | 22 ++ templates/skylar_morning.yaml | 2 +- templates/skylar_night.yaml | 14 +- templates/traffic_report.yaml | 6 + templates/tweet_snark.yaml | 52 ----- templates/twitter_new_ha.yaml | 0 templates/twitter_snark.yaml | 3 + templates/twitter_stats.yaml | 32 +++ templates/weather_report.yaml | 0 templates/welcome_home.yaml | 18 ++ 74 files changed, 1119 insertions(+), 1172 deletions(-) mode change 100644 => 100755 alerts/garage_after_dark.yaml mode change 100644 => 100755 alerts/jeff_bad_traffic_home.yaml mode change 100644 => 100755 alerts/jeff_heading_home.yaml mode change 100644 => 100755 alerts/kat_heading_home.yaml mode change 100644 => 100755 alerts/lockdown_issue.yaml mode change 100644 => 100755 alerts/unauthorized_access.yaml mode change 100644 => 100755 automations.yaml mode change 100644 => 100755 binary_sensors/calendar.yaml mode change 100644 => 100755 binary_sensors/doors.yaml mode change 100644 => 100755 binary_sensors/motion.yaml mode change 100644 => 100755 configuration.yaml mode change 100644 => 100755 customize.yaml mode change 100644 => 100755 groups.yaml mode change 100644 => 100755 input_boolean.yaml mode change 100644 => 100755 input_datetime.yaml mode change 100644 => 100755 input_select.yaml mode change 100644 => 100755 lights/living_room.yaml mode change 100644 => 100755 packages/announcements.yaml mode change 100644 => 100755 packages/disney.yaml mode change 100644 => 100755 packages/events.yaml mode change 100644 => 100755 packages/jarvis.yaml mode change 100644 => 100755 packages/maintenance.yaml mode change 100644 => 100755 packages/notify.yaml mode change 100644 => 100755 packages/presence.yaml mode change 100644 => 100755 packages/security.yaml mode change 100644 => 100755 packages/space.yaml mode change 100644 => 100755 packages/sysmon.yaml mode change 100644 => 100755 packages/usps.yaml mode change 100644 => 100755 packages/weather_alerts_nws.yaml mode change 100644 => 100755 packages/weekday.yaml delete mode 100644 packages/zigbe2mqtt.yaml mode change 100644 => 100755 scenes.yaml mode change 100644 => 100755 scripts.yaml mode change 100644 => 100755 sensors/batteries.yaml delete mode 100644 sensors/devices.yaml mode change 100644 => 100755 sensors/finance.yaml mode change 100644 => 100755 sensors/github.yaml mode change 100644 => 100755 sensors/google_travel_time.yaml mode change 100644 => 100755 sensors/house.yaml mode change 100644 => 100755 sensors/power.yaml mode change 100644 => 100755 sensors/speedtest.yaml mode change 100644 => 100755 sensors/users.yaml mode change 100644 => 100755 sensors/weather.yaml mode change 100644 => 100755 switches/bedroom.yaml mode change 100644 => 100755 switches/living_room.yaml mode change 100644 => 100755 switches/notifications.yaml mode change 100644 => 100755 switches/sonoff.yaml mode change 100644 => 100755 switches/upstairs.yaml delete mode 100644 templates/configuration.yaml create mode 100755 templates/halloween_countdown.yaml mode change 100644 => 100755 templates/iss_report.yaml mode change 100644 => 100755 templates/jarvis_confirmations.yaml mode change 100644 => 100755 templates/jarvis_interuptions.yaml mode change 100644 => 100755 templates/jarvis_issue.yaml mode change 100644 => 100755 templates/jeff_eta.yaml create mode 100755 templates/jeff_heading_home.yaml create mode 100755 templates/jeff_home_annc.yaml create mode 100755 templates/kat_arrived_at_work.yaml mode change 100644 => 100755 templates/kat_eta.yaml create mode 100755 templates/kat_heading_home.yaml create mode 100755 templates/kat_home_annc.yaml mode change 100644 => 100755 templates/morning_report.yaml mode change 100644 => 100755 templates/nightly_report.yaml mode change 100644 => 100755 templates/prebed_routing.yaml create mode 100755 templates/security_report.yaml mode change 100644 => 100755 templates/skylar_morning.yaml mode change 100644 => 100755 templates/skylar_night.yaml mode change 100644 => 100755 templates/traffic_report.yaml delete mode 100644 templates/tweet_snark.yaml mode change 100644 => 100755 templates/twitter_new_ha.yaml mode change 100644 => 100755 templates/twitter_snark.yaml create mode 100755 templates/twitter_stats.yaml mode change 100644 => 100755 templates/weather_report.yaml create mode 100755 templates/welcome_home.yaml diff --git a/alerts/garage_after_dark.yaml b/alerts/garage_after_dark.yaml old mode 100644 new mode 100755 diff --git a/alerts/jeff_bad_traffic_home.yaml b/alerts/jeff_bad_traffic_home.yaml old mode 100644 new mode 100755 diff --git a/alerts/jeff_heading_home.yaml b/alerts/jeff_heading_home.yaml old mode 100644 new mode 100755 diff --git a/alerts/kat_heading_home.yaml b/alerts/kat_heading_home.yaml old mode 100644 new mode 100755 diff --git a/alerts/lockdown_issue.yaml b/alerts/lockdown_issue.yaml old mode 100644 new mode 100755 diff --git a/alerts/unauthorized_access.yaml b/alerts/unauthorized_access.yaml old mode 100644 new mode 100755 diff --git a/automations.yaml b/automations.yaml old mode 100644 new mode 100755 index 3b3ae69..a41749b --- a/automations.yaml +++ b/automations.yaml @@ -40,10 +40,6 @@ entity_id: sensor.washer_status from: running to: complete - condition: - - condition: state - entity_id: input_boolean.washer_notification - state: 'on' action: - service: script.washer_finished_notification_audible - id: turn_off_disney @@ -80,10 +76,6 @@ - platform: time at: 05:00:00 action: - - service: script.add_logbook_entry - data_template: - name: Backup - message: is running - service: shell_command.backup - service: script.twitter_notify data_template: @@ -361,11 +353,11 @@ data: name: midnight-AH - id: turn_off_audible_notifications - alias: Turn Off Audible Notifications at 730pm + alias: Turn Off Audible Notifications initial_state: true trigger: - platform: time - at: '19:30:00' + at: '20:30:00' action: - service: input_boolean.turn_off entity_id: input_boolean.audible_notifications @@ -406,7 +398,7 @@ - service: input_boolean.turn_on entity_id: input_boolean.jeff_travel_monitor - id: enable_bad_traffic_home_jeff - alias: Enable Jeff Bad Traffic Home + alias: Notify Jeff - Bad Traffic initial_state: true trigger: - platform: numeric_state @@ -462,170 +454,10 @@ condition: [] action: - service: script.family_is_away -- id: family_has_arrived - alias: Family Has arrived - trigger: - - entity_id: sensor.family_status - from: Away - platform: state - to: Home - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.home - - entity_id: device_tracker.katherinestonesiphone - event: enter - platform: zone - zone: zone.home - - entity_id: binary_sensor.jeffrey_presence - from: 'Off' - platform: state - to: 'On' - - entity_id: binary_sensor.kat_presence - from: 'Off' - platform: state - to: 'On' - - entity_id: device_tracker.hass_jeffsiphone - event: enter - platform: zone - zone: zone.home - condition: - - condition: state - entity_id: sensor.family_status - state: Away - action: - - service: script.vacation_canceled - - service: script.appliances_on - - service: script.standby - - service: script.washer_finished_notification_audible - initial_state: true -- id: family_has_left - alias: Family Has Left - initial_state: true - trigger: - - entity_id: sensor.family_status - from: Home - platform: state - to: Away - condition: - - condition: state - entity_id: input_boolean.guest_mode - state: 'off' - action: - - service: script.appliances_off - - service: script.inside_all_off - - service: script.security_check_garage - - service: script.security_check_zones - - service: script.lockdown - - service: script.lockdown_issue - - service: script.all_fans_off -- id: jeff_is_home - alias: Jeff is Home - initial_state: true - trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.home - - entity_id: person.jeffrey - event: enter - platform: zone - zone: zone.home - action: - - service: script.family_is_home - - service: script.jeff_is_home - - service: script.jeff_destination_na - - service: script.driveway_on - - entity_id: input_boolean.jeff_travel_monitor - service: input_boolean.turn_off -- id: jeff_arrives_summit - alias: Jeff Arrives At Summit - trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.summit - - entity_id: device_tracker.hass_jeffsiphone - event: enter - platform: zone - zone: zone.summit - action: - - service: script.jeff_destination_na - initial_state: true -- id: jeff_leaves_summit - alias: Jeff Leaves Summit - initial_state: true - trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: leave - platform: zone - zone: zone.summit - action: - - service: input_boolean.turn_off - entity_id: input_boolean.jeff_traffic_alert_home -- id: kat_is_home - alias: Kat is Home - initial_state: true - trigger: - - entity_id: device_tracker.katherinestonesiphone - event: enter - platform: zone - zone: zone.home - - entity_id: person.katherine - event: enter - platform: zone - zone: zone.home - action: - - service: script.family_is_home - - service: script.driveway_on - - service: input_boolean.turn_off - entity_id: input_boolean.kat_travel_monitor -- id: kat_arrives_zoo - alias: Kat Arrives at Zoo - initial_state: true - trigger: - - platform: zone - event: enter - zone: zone.zoo_atlanta - entity_id: device_tracker.katherinestonesiphone - condition: - - condition: state - entity_id: input_boolean.text_notify_jeff - state: 'on' - action: - - service: input_boolean.turn_off - entity_id: input_boolean.kat_travel_monitor - - service: notify.jeff_ios - data: - message: Kat arrived at Zoo Atlanta - - service: tts.google_translate_say - data: - entity_id: media_player.hass_speaker - message: Kat has arrived at the Zoo -- id: kat_leaves_zoo - alias: Kat Leaves Zoo Notification - initial_state: true - trigger: - - platform: zone - event: leave - zone: zone.zoo_atlanta - entity_id: device_tracker.katherinestonesiphone - condition: - - condition: state - entity_id: input_boolean.text_notify_jeff - state: 'on' - action: - - service: input_boolean.turn_on - entity_id: input_boolean.kat_travel_monitor -- id: '1550109528753' - alias: Jeff Is Heading Home - initial_state: true - trigger: - - platform: webhook - webhook_id: jeff_heading_home - condition: [] - action: - - service: script.jeff_destination_home + + + + - id: '1558620708807' alias: Upstairs Cooling On initial_state: true @@ -723,10 +555,6 @@ trigger: - platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.kat_pill_reminder', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" - condition: - - condition: state - entity_id: input_boolean.text_notify_kat - state: 'on' action: - data: message: Remember to take meds diff --git a/binary_sensors/calendar.yaml b/binary_sensors/calendar.yaml old mode 100644 new mode 100755 index 1dd3b66..fb3956a --- a/binary_sensors/calendar.yaml +++ b/binary_sensors/calendar.yaml @@ -9,4 +9,8 @@ - platform: tod name: Day after: sunrise - before: sunset \ No newline at end of file + before: sunset +- platform: tod + name: Quiet time + after: '22:00' + before: '07:00' \ No newline at end of file diff --git a/binary_sensors/doors.yaml b/binary_sensors/doors.yaml old mode 100644 new mode 100755 diff --git a/binary_sensors/motion.yaml b/binary_sensors/motion.yaml old mode 100644 new mode 100755 diff --git a/configuration.yaml b/configuration.yaml old mode 100644 new mode 100755 index f655772..8c63945 --- a/configuration.yaml +++ b/configuration.yaml @@ -65,11 +65,11 @@ device_tracker: # track_new_devices: yes # - platform: owntracks # - #- platform: eero_tracker - # consider_home: 300 - # interval_seconds: 60 - # track_new_devices: yes - # only_macs: "50:dc:e7:5b:10:69, b0:ee:7b:94:31:21, e8:b2:ac:4c:8c:01, 7c:1c:4e:2e:62:30, 90:18:7c:84:46:ed, 48:ba:4e:65:d3:ff, d0:e7:82:ef:a6:1f, 28:18:78:74:79:10, e8:ab:fa:02:03:53, 48:d6:d5:42:e8:86, 60:f8:1d:be:20:46, 68:54:fd:d5:ae:3d, 00:d0:2d:2f:3b:ca, 6c:70:9f:00:ef:3f, 5c:cf:7f:af:04:50, 68:54:fd:29:20:87, 64:52:99:93:f1:b3, 7c:2e:bd:4f:3e:ff" + # - platform: eero_tracker + # consider_home: 300 + # interval_seconds: 60 + # track_new_devices: yes + # only_macs: "d0:c5:f3:80:50:5e, f4:31:c3:84:1d:d1, 08:74:02:CC:C4:97, 5C:F5:DA:9B:5A:A2, 34:7C:25:CC:9D:0F, 64:52:99:93:F1:B3" google: diff --git a/customize.yaml b/customize.yaml old mode 100644 new mode 100755 diff --git a/groups.yaml b/groups.yaml old mode 100644 new mode 100755 index 25dbfe7..85eff0d --- a/groups.yaml +++ b/groups.yaml @@ -37,6 +37,12 @@ External Doors: - binary_sensor.laundry_room_door_contact_2 - binary_sensor.garage_door +Garage Doors: + - binary_sensor.side_door_contact_2 + - binary_sensor.side_door + - binary_sensor.garage_door_contact_2 + - binary_sensor.garage_door + Internal Doors: - binary_sensor.attic_door_contact_2 diff --git a/input_boolean.yaml b/input_boolean.yaml old mode 100644 new mode 100755 index c98a18f..b4c329b --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -40,9 +40,6 @@ kat_heading_home: jeff_heading_home: name: Jeff Heading Home icon: mdi:car -skylar_dressed_alarm: - name: Skylar Dressed Alarm - icon: mdi:speaker-wireless jeff_traffic_alerts: name: Jeff Traffic Alerts icon: mdi:bell-plus @@ -70,33 +67,33 @@ presence_text_notifications: presence_audio_notifications: name: Presence Audio icon: mdi:speaker-wireless -shuffle_spotify: - name: Shuffle Playlists - icon: mdi:shuffle-variant weather_reports: name: Weather Info traffic_reports: name: traffic_reports sun_reports: name: Sun Reports -tweet_system: - name: Tweet System - icon: mdi:twitter -tweet_ha_releases: - name: Tweet HA Releases - icon: mdi:twitter -tweet_iss: - name: Tweet ISS Sightings - icon: mdi:twitter -tweet_snark: - name: Tweet Snark - icon: mdi:twitter -washer_notification: - name: Washer Notification - icon: mdi:speaker-wireless -play_weather_report: - name: Play Weather Report - icon: mdi:speaker-wireless +#tweet_system: +# name: Tweet System +# icon: mdi:twitter +# tweet_ha_releases: +# name: Tweet HA Releases +# icon: mdi:twitter +# tweet_iss: +# name: Tweet ISS Sightings +# icon: mdi:twitter +# tweet_snark: +# name: Tweet Snark +# icon: mdi:twitter +# tweet_stats: +# name: Tweet Stats +# icon: mdi:twitter +# washer_notification: +# name: Washer Notification +# icon: mdi:speaker-wireless +# play_weather_report: +# name: Play Weather Report +# icon: mdi:speaker-wireless new_ha_announcement: name: New HA Announcement icon: mdi:twitter \ No newline at end of file diff --git a/input_datetime.yaml b/input_datetime.yaml old mode 100644 new mode 100755 diff --git a/input_select.yaml b/input_select.yaml old mode 100644 new mode 100755 index 95f1e6b..5a62d3e --- a/input_select.yaml +++ b/input_select.yaml @@ -18,12 +18,3 @@ recycle_pickup: - Friday initial: Tuesday icon: mdi:delete-variant -spotify_source: - name: Spotify Source - options: - - Everywhere - - Living Room - - Master Bedroom - - Kitchen - initial: Everywhere - icon: mdi:speaker-wireless diff --git a/lights/living_room.yaml b/lights/living_room.yaml old mode 100644 new mode 100755 diff --git a/packages/announcements.yaml b/packages/announcements.yaml old mode 100644 new mode 100755 index fadcc2c..4c4a6c3 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -5,70 +5,48 @@ # @description : Just Normal Announcements. ############################################################################### -script: +#script: - annc_storm_statement: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - - service: notify.ios_all - data: - message: Severe Storm Statement Issued for Anchorage House - annc_tstorm_watch: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - - service: notify.ios_all - data: - message: Severe Thunderstorm Watch Issued for Anchorage House - annc_tstorm_warning: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - - service: notify.ios_all - data: - message: Severe Thunderstorm Warning Issued for Anchorage House - annc_tornado_watch: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: input_boolean.vacation_mode - state: 'off' - - service: notify.ios_all - data: - message: Tornado Watch Issued for Anchorage House - annc_security_issue: - sequence: - - condition: state - entity_id: group.family - state: 'on' - - service: tts.google_translate_say - data: - entity_id: media_player.hass_speaker - message: Unauthorized Access - annc_tornado_warning: - sequence: - - condition: state - entity_id: sensor.family_status - state: Home - - service: script.alert_notify - data_template: - message: "Tornado Warning has been Issued" - greeting: "no" + # annc_storm_statement: + # sequence: + # - condition: state + # entity_id: input_boolean.vacation_mode + # state: 'off' + # - service: script.text_notify + # data: + # message: Severe Storm Statement Issued for Anchorage House + # annc_tstorm_watch: + # sequence: + # - condition: state + # entity_id: input_boolean.vacation_mode + # state: 'off' + # - service: script.text_notify + # data: + # message: Severe Thunderstorm Watch Issued for Anchorage House + # annc_tstorm_warning: + # sequence: + # - condition: state + # entity_id: input_boolean.vacation_mode + # state: 'off' + # - service: script.text_notify + # data: + # message: Severe Thunderstorm Warning Issued for Anchorage House + # annc_tornado_watch: + # sequence: + # - condition: state + # entity_id: input_boolean.vacation_mode + # state: 'off' + # - service: script.text_notify + # data: + # message: Tornado Watch Issued for Anchorage House + # annc_tornado_warning: + # sequence: + # - condition: state + # entity_id: sensor.family_status + # state: Home + # - service: script.alert_notify + # data_template: + # message: "Tornado Warning has been Issued" automation: - id: prebed_routine @@ -77,10 +55,6 @@ automation: trigger: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" - condition: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' action: - service: script.prebed_routine - id: nightly_report @@ -89,22 +63,15 @@ automation: trigger: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" - condition: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' action: - service: script.nightly_report + - id: good_morning_report alias: Good Morning Report initial_state: true trigger: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" - condition: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' action: - service: script.morning_report - service: script.twitter_notify @@ -125,39 +92,7 @@ automation: - wed - thu - fri - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' action: - service: script.skylar_morning_greeting - - id: play_weather_report - alias: Play Weather Report - initial_state: true - trigger: - - entity_id: input_boolean.play_weather_report - from: 'Off' - platform: state - to: 'On' - action: - - service: script.turn_on - entity_id: script.weather_report - - service: script.voice_reports_off - - id: guest_mode_feedback - alias: Guest Mode Audio Feedback - trigger: - - platform: state - entity_id: - - input_boolean.guest_mode - from: 'off' - to: 'on' - action: - - service: script.jarvis_voice - data_template: - message: > - {{ [ - "Guest Mode has been enabled as you requested.", - "I have switched to the system to guest mode", - "I have enabled guest mode. ", - "System Guest Mode has been enabled." - ] | random }} + diff --git a/packages/disney.yaml b/packages/disney.yaml old mode 100644 new mode 100755 diff --git a/packages/events.yaml b/packages/events.yaml old mode 100644 new mode 100755 index 6a78521..f4b4c4c --- a/packages/events.yaml +++ b/packages/events.yaml @@ -98,6 +98,16 @@ automation: - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - service: script.twitter_snark + - id: tweet_some_stats + alias: Tweet Some Stats + initial_state: true + trigger: + - platform: time + at: '08:00:00' + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_stats + - id: bot_info alias: Bot Info initial_state: true @@ -113,7 +123,7 @@ automation: {%- endif -%} action: - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_notift + - service: script.twitter_notify data_template: message: >- "This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" diff --git a/packages/jarvis.yaml b/packages/jarvis.yaml old mode 100644 new mode 100755 index 68f0c19..55ae47d --- a/packages/jarvis.yaml +++ b/packages/jarvis.yaml @@ -24,6 +24,24 @@ automation: "I have enabled guest mode. ", "Guest Mode is on." ] | random }} +- id: sentry_mode_feedback + alias: Sentry Mode Audio Feedback + trigger: + - platform: state + entity_id: + - input_boolean.sentry_mode + from: 'off' + to: 'on' + action: + - service: script.jarvis_voice + data_template: + message: > + {{ [ + "Sentry Mode has been enabled.", + "Anchorage House is secure.", + "I have enabled sentry mode. ", + "I am monitoring Anchorage House." + ] | random }} script: activate_house_party_protocol: @@ -42,14 +60,4 @@ script: "Anchorage House has been configured for a House Party.", "Incense has been turned on.", "I have enabled house party protocol." - ] | random }} - - activate_guest_mode: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jarvis_confirmations.yaml - - delay: - seconds: 3 - - service: input_boolean.turn_on - entity_id: input_boolean.guest_mode \ No newline at end of file + ] | random }} \ No newline at end of file diff --git a/packages/maintenance.yaml b/packages/maintenance.yaml old mode 100644 new mode 100755 diff --git a/packages/notify.yaml b/packages/notify.yaml old mode 100644 new mode 100755 index ee5eb9f..1ea8173 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -31,6 +31,12 @@ notify: - service: ios_jeffreystonesiphone - service: ios_jeffreystonesipad - service: ios_katherinestonesiphone + - name: ios_parents + platform: group + services: + - service: ios_jeffreystonesiphone + - service: ios_jeffreystonesipad + - service: ios_katherinestonesiphone - name: jeff_ios platform: group services: @@ -92,6 +98,65 @@ script: message: > {{ message }} + text_notify: + sequence: + - condition: state + entity_id: input_boolean.text_notifications + state: 'on' + - service_template: > + {% if who == 'jeff' %} + notify.jeff_ios + {% elif who == 'kat' %} + notify.kat_ios + {% elif who == 'skylar' %} + notify.skylar_ios + {% elif who == 'parents' %} + notify.ios_parents + {% else %} + notify.all_ios + {% endif %} + data_template: + title: '{{ title }}' + message: '{{ message }}' + #data: + # attachment: + # url: "{{ url }}" + # content-type: "{{ content_type }}" + # hide-thumbnail: false + # push: + # sound: "{{ ios_sound }}" + # badge: 0 + # category: "{{ ios_category }}" + # entity_id: "{{ camera_entity }}" + + text_alert: + sequence: + - service_template: > + {% if who == 'jeff' %} + notify.jeff_ios + {% elif who == 'kat' %} + notify.kat_ios + {% elif who == 'skylar' %} + notify.skylar_ios + {% elif who == 'parents' %} + notify.ios_parents + {% else %} + notify.all_ios + {% endif %} + data_template: + title: '{{ title }}' + message: '{{ message }}' + #data: + # attachment: + # url: "{{ url }}" + # content-type: "{{ content_type }}" + # hide-thumbnail: false + # push: + # sound: "{{ ios_sound }}" + # badge: 0 + # category: "{{ ios_category }}" + # entity_id: "{{ camera_entity }}" + ############################################################################### # Alert Notify # Conditions: @@ -152,7 +217,7 @@ script: jarvis_voice: sequence: - condition: template - value_template: '{{ states.input_boolean.audible_notifications.state == "on" }}' + value_template: '{{ states.binary_sensor.quiet_time.state == "off" }}' - condition: state entity_id: sensor.family_status state: 'Home' @@ -163,13 +228,12 @@ script: {{ not is_state('media_player.hass_speaker', 'playing') }} - service: tts.amazon_polly_say data_template: - entity_id: media_player.hass_speaker - # entity_id: > - # {% if states.input_boolean.audible_notifications.state == 'on' %} - # media_player.hass_speaker - # {% else %} - # media_player.googlehome0715, media_player.googlehomehub3492 - # {% endif %} + entity_id: > + {% if states.input_boolean.audible_notifications.state == 'on' %} + media_player.hass_speaker + {% else %} + media_player.googlehome0715, media_player.googlehomehub3492 + {% endif %} message: >- {{ message }} @@ -182,9 +246,6 @@ script: twitter_notify: sequence: - - condition: state - entity_id: input_boolean.tweet_system - state: 'on' - service: notify.twitter data_template: message: > @@ -195,18 +256,19 @@ script: twitter_snark: sequence: - - condition: state - entity_id: input_boolean.tweet_snark - state: 'on' - service: notify.twitter data_template: message: !include ../templates/twitter_snark.yaml + + + twitter_stats: + sequence: + - service: notify.twitter + data_template: + message: !include ../templates/twitter_stats.yaml twitter_github: sequence: - - condition: state - entity_id: input_boolean.tweet_system - state: 'on' - service: notify.twitter data_template: message: > @@ -217,9 +279,6 @@ script: twitter_new_ha: sequence: - - condition: state - entity_id: input_boolean.tweet_releases - state: 'on' - service: notify.twitter data_template: message: !include ../templates/twitter_new_ha.yaml @@ -263,17 +322,12 @@ script: ############################################################################### weather_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jarvis_confirmations.yaml - - delay: - seconds: 3 - service: script.jarvis_voice data_template: message: !include ../templates/weather_report.yaml - delay: minutes: 5 - - service: scriot.turn_off + - service: script.turn_off entity_id: script.weather_report ############################################################################### @@ -284,25 +338,70 @@ script: - service: script.jarvis_voice data_template: message: !include ../templates/traffic_report.yaml + - delay: + minutes: 2 + - service: script.turn_off + entity_id: script.traffic_report ############################################################################### -# Jeff ETA Report +# Security Report +############################################################################### + security_report: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/security_report.yaml + - delay: + minutes: 2 + - service: script.turn_off + entity_id: script.security_report + +############################################################################### +# Jeff Traffic Reports ############################################################################### jeff_eta_report: sequence: - service: script.jarvis_voice data_template: message: !include ../templates/jeff_eta.yaml + - delay: + minutes: 2 + - service: script.turn_off + entity_id: script.jeff_eta_report + + jeff_headed_home_annc: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jeff_heading_home.yaml + - delay: + minutes: 2 + - service: script.turn_off + entity_id: script.jeff_headed_home_annc + ############################################################################### -# Kat ETA Report +# Kat Traffic Reports ############################################################################### kat_eta_report: sequence: - service: script.jarvis_voice data_template: message: !include ../templates/kat_eta.yaml + - delay: + minutes: 2 + - service: script.turn_off + entity_id: script.kat_eta_report + kat_headed_home_annc: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/kat_heading_home.yaml + - delay: + minutes: 2 + - service: script.turn_off + entity_id: script.kat_headed_home_annc ############################################################################### # Prebed Routing ############################################################################### diff --git a/packages/presence.yaml b/packages/presence.yaml old mode 100644 new mode 100755 index 66bc451..4f90e13 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -37,6 +37,17 @@ sensor: {% else %} {{ states.device_tracker.jeffreystonesiphone.state }} {%- endif %} + jeff_driving: + friendly_name: "Jeff' Driving" + unit_of_measurement: '' + value_template: >- + {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} + on + {% elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} + on + {% else %} + off + {% endif %} - platform: template sensors: skylar_location: @@ -79,6 +90,19 @@ sensor: {% else %} {{ states.device_tracker.katherinestonesiphone.state }} {%- endif %} + - platform: template + sensors: + kat_driving: + friendly_name: "Kat Driving" + unit_of_measurement: '' + value_template: >- + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + 'on' + {% elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + 'on' + {% else %} + 'off' + {% endif %} - platform: mqtt name: "Family Status" state_topic: "house/family/status" @@ -107,3 +131,210 @@ sensor: or is_state('device_tracker.katherinestonesiphone', 'home') or is_state('device_tracker.life360_kat_stone', 'home') or is_state('sensor.family_status', 'Home') }} + +automation: + - id: kat_arrives_zoo + alias: Kat Arrives at Zoo + initial_state: true + trigger: + - platform: zone + event: enter + zone: zone.zoo_atlanta + entity_id: device_tracker.katherinestonesiphone + action: + - service: input_boolean.turn_off + entity_id: input_boolean.kat_travel_monitor + - service: script.jarvis_voice + data_template: + message: !include ../templates/kat_arrived_at_work.yaml + - id: kat_leaves_zoo + alias: Kat Leaves Zoo Notification + initial_state: true + trigger: + - platform: zone + event: leave + zone: zone.zoo_atlanta + entity_id: device_tracker.katherinestonesiphone + condition: + action: + - service: input_boolean.turn_on + entity_id: input_boolean.kat_travel_monitor + - id: '1550109528753' + alias: Jeff Is Heading Home + initial_state: true + trigger: + - platform: webhook + webhook_id: jeff_heading_home + condition: [] + action: + - service: script.jeff_destination_home + + - id: family_has_arrived + alias: Family Has arrived + trigger: + - entity_id: sensor.family_status + from: Away + platform: state + to: Home + - entity_id: device_tracker.jeffreystonesiphone + event: enter + platform: zone + zone: zone.home + - entity_id: device_tracker.katherinestonesiphone + event: enter + platform: zone + zone: zone.home + - entity_id: binary_sensor.jeffrey_presence + from: 'Off' + platform: state + to: 'On' + - entity_id: binary_sensor.kat_presence + from: 'Off' + platform: state + to: 'On' + - entity_id: device_tracker.hass_jeffsiphone + event: enter + platform: zone + zone: zone.home + condition: + - condition: state + entity_id: sensor.family_status + state: Away + action: + - service: script.vacation_canceled + - service: script.appliances_on + - service: script.standby + - service: script.washer_finished_notification_audible + initial_state: true + - id: family_has_left + alias: Family Has Left + initial_state: true + trigger: + - entity_id: sensor.family_status + from: Home + platform: state + to: Away + condition: + - condition: state + entity_id: input_boolean.guest_mode + state: 'off' + action: + - service: script.appliances_off + - service: script.inside_all_off + - service: script.security_check_garage + - service: script.security_check_zones + - service: script.lockdown + - service: script.lockdown_issue + - service: script.all_fans_off + - id: jeff_is_home + alias: Jeff is Home + initial_state: true + trigger: + - entity_id: device_tracker.jeffreystonesiphone + event: enter + platform: zone + zone: zone.home + # - entity_id: person.jeffrey + # event: enter + # platform: zone + # zone: zone.home + action: + - service: script.family_is_home + - service: script.jeff_is_home + - service: script.jeff_destination_na + - service: script.driveway_on + - entity_id: input_boolean.jeff_travel_monitor + service: input_boolean.turn_off + - id: jeff_arrives_summit + alias: Jeff Arrives At Summit + trigger: + - entity_id: device_tracker.jeffreystonesiphone + event: enter + platform: zone + zone: zone.summit + - entity_id: device_tracker.hass_jeffsiphone + event: enter + platform: zone + zone: zone.summit + action: + - service: script.text_notify + data: + who: "kat" + message: "Jeff has arrived at Summit" + initial_state: true + - id: jeff_arrives_summit_notification + alias: Notify Kat Jeff At Summit + trigger: + - entity_id: device_tracker.jeffreystonesiphone + event: enter + platform: zone + zone: zone.summit + - entity_id: device_tracker.hass_jeffsiphone + event: enter + platform: zone + zone: zone.summit + action: + - service: script.jeff_destination_na + initial_state: true + - id: jeff_leaves_summit + alias: Jeff Leaves Summit + initial_state: true + trigger: + - entity_id: device_tracker.jeffreystonesiphone + event: leave + platform: zone + zone: zone.summit + action: + - service: input_boolean.turn_off + entity_id: input_boolean.jeff_traffic_alert_home + - id: kat_is_home + alias: Kat is Home + initial_state: true + trigger: + - entity_id: device_tracker.katherinestonesiphone + event: enter + platform: zone + zone: zone.home + - entity_id: person.katherine + event: enter + platform: zone + zone: zone.home + action: + - service: script.family_is_home + - service: script.driveway_on + - service: input_boolean.turn_off + entity_id: input_boolean.kat_travel_monitor + + - id: annc_arrival_jeff + alias: 'Announce Jeff Arrived' + trigger: + - platform: state + entity_id: + - device_tracker.jeffreystonesiphone + from: 'not_home' + to: 'home' + condition: + - condition: state + entity_id: sensor.family_status + state: Home + action: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jeff_home_annc.yaml + + - id: annc_arrival_kat + alias: 'Announce Kat Arrived' + trigger: + - platform: state + entity_id: + - device_tracker.katherinestonesiphone + from: 'not_home' + to: 'home' + condition: + - condition: state + entity_id: sensor.family_status + state: Home + action: + - service: script.jarvis_voice + data_template: + message: !include ../templates/kat_home_annc.yaml \ No newline at end of file diff --git a/packages/security.yaml b/packages/security.yaml old mode 100644 new mode 100755 index f083093..5ea6813 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -138,15 +138,64 @@ automation: - service: shell_command.door_chime initial_state: true + - id: door_opened_long + alias: Door Opened Too Long + trigger: + - platform: state + entity_id: + - binary_sensor.front_door + - binary_sensor.laundry_room_door + - binary_sensor.attic_door + - binary_sensor.back_door + from: 'off' + to: 'on' + for: '00:01:00' + condition: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + action: + - service: script.jarvis_voice + data_template: + message: "I thought you might like to know, the {{ trigger.to_state.attributes.friendly_name }} has been standing open for more than a minute." + initial_state: true + + - id: garage_opened_night + alias: Garage Opened at Night + trigger: + - platform: state + entity_id: group.garage_doors + from: 'off' + to: 'on' + condition: + - condition: state + entity_id: sun.sun + state: below_horizon + action: + - service: script.driveway_on + initial_state: true + + - id: garage_closed + alias: Garage Opened at Night + trigger: + - platform: state + entity_id: group.garage_doors + from: 'on' + to: 'off' + action: + - service: script.driveway_off + initial_state: true + - id: security_breach_door alias: Security Breach Doors trigger: - platform: state entity_id: - - binary_sensor.front_door_contact_2 - - binary_sensor.laundry_room_door_contact_2 - - binary_sensor.attic_door_contact_2 - - binary_sensor.back_door_contact_2 + - binary_sensor.front_door + - binary_sensor.laundry_room_door + - binary_sensor.back_door + - binary_sensor.side_door + - binary_sensor.garage_door from: 'off' condition: - condition: state @@ -155,11 +204,52 @@ automation: action: - service: script.jarvis_notify data_template: - message: "The {{ trigger.to_state.attributes.friendly_name }} has been opened." + message: "My security protocols are being overidden,, The {{ trigger.to_state.attributes.friendly_name }} has been opened." + - service: script.text_alert + data_template: + title: "Security Alert!!" + message: "{{ trigger.to_state.attributes.friendly_name }} has been opened." - service: input_boolean.turn_on entity_id: input_boolean.security_issue initial_state: true + - id: sentry_mode_enabled + alias: Sentry Mode Enabled Annoucement + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.sentry_mode + from: 'off' + to: 'on' + action: + - service: script.jarvis_voice + data: + message: > + {{ [ + "Barn door protocol has been activated.", + "Anchorage House has been secured! ", + "Sentry Mode is active. ", + "I am now monitoring the doors and will let you know if anyone attempts to access." + ] | random }} + + - id: sentry_mode_disabled + alias: Sentry Mode Disabled Annoucement + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.sentry_mode + from: 'on' + to: 'off' + action: + - service: script.jarvis_voice + data: + message: > + {{ [ + "Barn door protocol has been deactivated.", + "I am no longer monitoring the access points. ", + "Sentry Mode has been switched off. " + ] | random }} + script: lockdown_issue: sequence: @@ -171,6 +261,10 @@ script: state: "Away" - service: input_boolean.turn_on entity_id: input_boolean.lockdown_issue + - service: script.text_notify + data_template: + title: "Lockdown Issue!" + message: "Doors are open and it appears everyone has left!" security_check_garage: sequence: @@ -205,18 +299,17 @@ script: entity_id: input_boolean.sentry_mode - service: input_boolean.turn_off entity_id: input_boolean.security_issue + - service: input_boolean.turn_off + entity_id: input_boolean.lockdown_issue - service: input_boolean.turn_off entity_id: input_boolean.security_alarm visitors_here: sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - service: input_boolean.turn_on data: entity_id: input_boolean.guest_mode - - service: shell_command.haunted_guest_welcome + #- service: shell_command.haunted_guest_welcome visitors_gone: sequence: @@ -228,48 +321,74 @@ script: sequence: - service: shell_command.security_alarm - + # notification_sentry_mode_activated_audio: + # sequence: + # - condition: state + # entity_id: input_boolean.audible_notifications + # state: 'on' + # - condition: state + # entity_id: media_player.hass_speaker + # state: 'idle' + # - service: tts.google_say + # entity_id: media_player.hass_speaker + # data_template: + # message: "Sentry mode activated" - notification_sentry_mode_activated_audio: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: media_player.hass_speaker - state: 'idle' - - service: tts.google_say - entity_id: media_player.hass_speaker - data_template: - message: "Sentry mode activated" - - notification_sentry_mode_deactivated_audio: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: media_player.hass_speaker - state: 'idle' - - service: tts.google_say - entity_id: media_player.hass_speaker - data_template: - message: "Sentry mode deactivated" + # notification_sentry_mode_deactivated_audio: + # sequence: + # - condition: state + # entity_id: input_boolean.audible_notifications + # state: 'on' + # - condition: state + # entity_id: media_player.hass_speaker + # state: 'idle' + # - service: tts.google_say + # entity_id: media_player.hass_speaker + # data_template: + # message: "Sentry mode deactivated" - notification_sentry_mode_deactiviated_text: - sequence: - - service: notify.jeff_ios - data: - message: Sentry Mode Deactivated + # notification_sentry_mode_deactiviated_text: + # sequence: + # - service: notify.jeff_ios + # data: + # message: Sentry Mode Deactivated - notification_sentry_mode_activiated_text: - sequence: - - service: notify.jeff_ios - data: - message: Sentry Mode Activated + # notification_sentry_mode_activiated_text: + # sequence: + # - service: notify.jeff_ios + # data: + # message: Sentry Mode Activated vacation_canceled: sequence: - data: entity_id: input_boolean.vacation_mode service: input_boolean.turn_off + + activate_barn_door_protocol: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_confirmations.yaml + - service: input_boolean.turn_on + entity_id: input_boolean.sentry_mode + + deactivate_barn_door_protocol: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_confirmations.yaml + - service: input_boolean.turn_off + entity_id: input_boolean.sentry_mode + + activate_guest_mode: + sequence: + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_confirmations.yaml + - delay: + seconds: 2 + - service: input_boolean.turn_on + entity_id: input_boolean.guest_mode + + diff --git a/packages/space.yaml b/packages/space.yaml old mode 100644 new mode 100755 index cc62d9e..1a3ed60 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -81,10 +81,6 @@ automation: - binary_sensor.iss to: 'on' from: 'off' - condition: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' action: - service: script.jarvis_voice data_template: diff --git a/packages/sysmon.yaml b/packages/sysmon.yaml old mode 100644 new mode 100755 diff --git a/packages/usps.yaml b/packages/usps.yaml old mode 100644 new mode 100755 index 54c128d..963b1b8 --- a/packages/usps.yaml +++ b/packages/usps.yaml @@ -40,10 +40,6 @@ automation: at: '00:00:10' action: - service: shell_command.usps - - service: script.add_logbook_entry - data_template: - name: USPS - message: Reset Mail Count - id: get_usps initial_state: true @@ -53,10 +49,6 @@ automation: at: '10:00:00' action: - service: shell_command.usps - - service: script.add_logbook_entry - data_template: - name: USPS - message: Checking for mail # Notify USPS mails via TTS, and iOS notification with attachment ############################################################################### @@ -72,7 +64,12 @@ automation: - condition: template value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}' action: - - service: script.voice_notify + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_interuptions.yaml + - delay: + seconds: 2 + - service: script.jarvis_notify data_template: message: > {%- if states.sensor.usps_mail.state | int == 1 -%} @@ -80,16 +77,18 @@ automation: {%- else -%} USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today. {%- endif -%} - - service: notify.jeff_ios + - service: script.text_notify data_template: + who: "jeff" + title: "USPS Delivering Today" message: "USPS will be delivering {{ states.sensor.usps_mail.state }} piece(s) of mail today." - data: - push: - category: camera - entity_id: "camera.usps_mail_pictures" - attachment: - url: "{{ states.camera.usps_mail_pictures.attributes.entity_picture }}" - content-type: jpg + # data: + # push: + # category: camera + # entity_id: "camera.usps_mail_pictures" + # attachment: + # url: "{{ states.camera.usps_mail_pictures.attributes.entity_picture }}" + # content-type: jpg # Notify USPS packages via TTS. Usually there are no pictures for packages ############################################################################### @@ -105,7 +104,12 @@ automation: - condition: template value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}' action: - - service: script.voice_notify + - service: script.jarvis_voice + data_template: + message: !include ../templates/jarvis_interuptions.yaml + - delay: + seconds: 2 + - service: script.jarvis_notify data_template: message: > {%- if states.sensor.usps_packages.state | int == 1 -%} diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml old mode 100644 new mode 100755 index 0a065be..f4e44c9 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -86,8 +86,9 @@ automation: - condition: template value_template: '{{ trigger.to_state.state|float > trigger.from_state.state|float }}' action: - - service: notify.jeff_ios + - service: script.text_notify data_template: + title: "Weather Alert for Anchorage House" message: > {% if states.sensor.nws_alerts.attributes.title.split(' - ')[5] is defined %} "NWS: {{ states.sensor.nws_alerts.attributes.title.split(' - ')[5] }}" @@ -185,9 +186,10 @@ automation: - delay: '00:00:15' - service: input_boolean.turn_on entity_id: input_boolean.tornado_alarm - - service: script.text_notify_all + - service: script.text_alert data_template: - message: "Attention!,,,Attention!,,,The National Weather Service Has issued a Tornado Warning for our area." + title: "Tornado Warning!" + message: "The National Weather Service Has issued a Tornado Warning for our area." - alias: Activate Tornado alarm initial_state: 'on' @@ -214,6 +216,19 @@ automation: action: - service: media_player.media_stop entity_id: media_player.hass_speaker + + - id: play_weather_report + alias: Play Weather Report + initial_state: true + trigger: + - entity_id: input_boolean.play_weather_report + from: 'Off' + platform: state + to: 'On' + action: + - service: script.turn_on + entity_id: script.weather_report + - service: script.voice_reports_off script: nws_popup_on_wx_alert: diff --git a/packages/weekday.yaml b/packages/weekday.yaml old mode 100644 new mode 100755 diff --git a/packages/zigbe2mqtt.yaml b/packages/zigbe2mqtt.yaml deleted file mode 100644 index 646b205..0000000 --- a/packages/zigbe2mqtt.yaml +++ /dev/null @@ -1,171 +0,0 @@ -############################################################################### -# @author : Jeffrey Stone -# @date : 02/19/2019 -# @package : Zigbee2mqtt -# @description : Zigbee2mqtt Config -############################################################################### - - - -# Group -group: - zigbee_group: - view: false - control: hidden - name: Zigbee2mqtt - entities: - - input_boolean.zigbee_permit_join - - timer.zigbee_permit_join - - sensor.zigbee2mqtt_bridge_state - - switch.zigbee2mqtt_main_join - - automation.enable_zigbee_joining - - automation.disable_zigbee_joining - - automation.disable_zigbee_joining_by_timer - - input_select.zigbee2mqtt_log_level - - automation.zigbee2mqtt_log_level - -# Input select for Zigbee2mqtt debug level -input_select: - zigbee2mqtt_log_level: - name: Zigbee2mqtt Log Level - options: - - debug - - info - - warn - - error - initial: info - icon: mdi:format-list-bulleted - -# Input boolean for enabling/disabling joining -input_boolean: - zigbee_permit_join: - name: Allow devices to join - initial: off - icon: mdi:cellphone-wireless - -# Timer for joining time remaining (120 sec = 2 min) -timer: - zigbee_permit_join: - name: Time remaining - duration: 120 - -# Sensor for monitoring the bridge state -sensor: - - platform: mqtt - name: Zigbee2mqtt Bridge state - state_topic: "zigbee2mqtt/bridge/state" - icon: mdi:router-wireless - - platform: "mqtt" - name: "towerlight" - state_topic: "zigbee2mqtt/tower lamp" - availability_topic: "zigbee2mqtt/bridge/state" - unit_of_measurement: "-" - value_template: "{{ value_json.linkquality }}" - - platform: "mqtt" - state_topic: "zigbee2mqtt/rainbow light" - availability_topic: "zigbee2mqtt/bridge/state" - unit_of_measurement: "-" - value_template: "{{ value_json.linkquality }}" - -# Switch for enabling joining -switch: - - platform: mqtt - name: "Zigbee2mqtt Main join" - state_topic: "zigbee2mqtt/bridge/config/permit_join" - command_topic: "zigbee2mqtt/bridge/config/permit_join" - payload_on: "true" - payload_off: "false" - - platform: "mqtt" - name: "rainbowlight" - state_topic: "zigbee2mqtt/rainbow light" - availability_topic: "zigbee2mqtt/bridge/state" - payload_off: "OFF" - payload_on: "ON" - value_template: "{{ value_json.state }}" - command_topic: "zigbee2mqtt/rainbow light/set" - -# Automations -automation: - - alias: Zigbee2mqtt Log Level - initial_state: 'on' - trigger: - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: debug - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: warn - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: error - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: info - action: - - service: mqtt.publish - data: - payload_template: '{{ states(''input_select.zigbee2mqtt_log_level'') }}' - topic: zigbee2mqtt/bridge/config/log_level - - - id: enable_zigbee_join - alias: Enable Zigbee joining - hide_entity: true - trigger: - platform: state - entity_id: input_boolean.zigbee_permit_join - to: 'on' - action: - - service: mqtt.publish - data: - topic: zigbee2mqtt/bridge/config/permit_join - payload: 'true' - - service: timer.start - data: - entity_id: timer.zigbee_permit_join - - - id: disable_zigbee_join - alias: Disable Zigbee joining - hide_entity: true - trigger: - - entity_id: input_boolean.zigbee_permit_join - platform: state - to: 'off' - action: - - data: - payload: 'false' - topic: zigbee2mqtt/bridge/config/permit_join - service: mqtt.publish - - data: - entity_id: timer.zigbee_permit_join - service: timer.cancel - - - id: disable_zigbee_join_timer - alias: Disable Zigbee joining by timer - hide_entity: true - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.zigbee_permit_join - action: - - service: mqtt.publish - data: - topic: zigbee2mqtt/bridge/config/permit_join - payload: 'false' - - service: input_boolean.turn_off - data: - entity_id: input_boolean.zigbee_permit_join - -light: - - platform: "mqtt" - name: "towerlamp" - state_topic: "zigbee2mqtt/tower lamp" - availability_topic: "zigbee2mqtt/bridge/state" - brightness: true - color_temp: true - xy: true - schema: "json" - command_topic: "zigbee2mqtt/tower lamp/set" - - - diff --git a/scenes.yaml b/scenes.yaml old mode 100644 new mode 100755 diff --git a/scripts.yaml b/scripts.yaml old mode 100644 new mode 100755 index faa596f..5374016 --- a/scripts.yaml +++ b/scripts.yaml @@ -5,16 +5,21 @@ washer_finished_notification_audible: - condition: state entity_id: sensor.family_status state: Home - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - condition: state entity_id: sensor.washer_status state: complete - - service: tts.google_translate_say - entity_id: media_player.hass_speaker + - service: script.jarvis_voice data_template: - message: Just a reminder. Washing machine needs to be emptied. + message: > + {%- macro washing_annc() -%} + {{ [ + "Just a reminder. Washing machine needs to be emptied.", + "I'm sure you have more inportant things to do, but the washing machine needs to be emptied.", + "Looks like the washing machine has completed it's cycle.", + "Don't forget to move the clothes to the dryer." + ] | random }} + {%- endmacro -%} + {{washing_annc()}} girl_eyes_on_you: sequence: - service: media_player.play_media @@ -43,40 +48,6 @@ washer_complete: topic: house/washer/status payload: complete retain: true -add_logbook_entry: - alias: Add Logbook - sequence: - - service: logbook.log - data_template: - name: '{{ name }} - - ' - message: '{{ message }} - - ' -test_twitter: - sequence: - - service: script.twitter_notify - data: - message: Just a test of my notification capabilities! -climate_set_heat: - sequence: - - service: climate.set_operation_mode - data: - entity_id: climate.first_floor - operation_mode: heat -climate_turn_off: - sequence: - - data: - entity_id: climate.first_floor - operation_mode: 'off' - service: climate.set_operation_mode -climate_set_cool: - sequence: - - service: climate.set_operation_mode - data: - entity_id: climate.first_floor - operation_mode: cool normal_tower: sequence: - service: light.turn_on @@ -97,58 +68,58 @@ open_garage: state: closed - service: cover.open_cover entity_id: cover.cargo_bay -play_skylars_christmas_playlist: - sequence: - - service: media_player.volume_set - data: - entity_id: media_player.spotify - volume_level: '0.40' - - service: media_player.select_source - data_template: - entity_id: media_player.spotify - source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere - {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room - {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif - is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom - {% endif %} +# play_skylars_christmas_playlist: +# sequence: +# - service: media_player.volume_set +# data: +# entity_id: media_player.spotify +# volume_level: '0.40' +# - service: media_player.select_source +# data_template: +# entity_id: media_player.spotify +# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere +# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room +# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif +# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom +# {% endif %} - ' - - service: media_player.play_media - data_template: - entity_id: media_player.spotify - media_content_type: playlist - media_content_id: spotify:user:spotify:playlist:2lmfykOn8EK0Ow8iH9XHLa - - service: media_player.shuffle_set - data: - entity_id: media_player.spotify - shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif - is_state("input_select.shuffle_spotify", "Off") %} False {% endif %} +# ' +# - service: media_player.play_media +# data_template: +# entity_id: media_player.spotify +# media_content_type: playlist +# media_content_id: spotify:user:spotify:playlist:2lmfykOn8EK0Ow8iH9XHLa +# - service: media_player.shuffle_set +# data: +# entity_id: media_player.spotify +# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif +# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %} - ' -play_skylars_playlist: - sequence: - - service: media_player.volume_set - data: - entity_id: media_player.spotify - volume_level: '0.40' - - service: media_player.select_source - data_template: - entity_id: media_player.spotify - source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere - {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room - {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif - is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom - {% endif %}' - - service: media_player.play_media - data_template: - entity_id: media_player.spotify - media_content_type: playlist - media_content_id: spotify:user:spotify:playlist:0hYKkmUpFFG37TtFX23cMM - - service: media_player.shuffle_set - data: - entity_id: media_player.spotify - shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif - is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}' +# ' +# play_skylars_playlist: +# sequence: +# - service: media_player.volume_set +# data: +# entity_id: media_player.spotify +# volume_level: '0.40' +# - service: media_player.select_source +# data_template: +# entity_id: media_player.spotify +# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere +# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room +# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif +# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom +# {% endif %}' +# - service: media_player.play_media +# data_template: +# entity_id: media_player.spotify +# media_content_type: playlist +# media_content_id: spotify:user:spotify:playlist:0hYKkmUpFFG37TtFX23cMM +# - service: media_player.shuffle_set +# data: +# entity_id: media_player.spotify +# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif +# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}' tornado_alarm: sequence: - service: shell_command.tornado_alarm @@ -200,20 +171,15 @@ jeff_destination_harbins: topic: jeff/driving/destination payload: Harbins retain: true -jeff_at_work_notification: +kat_destination_na: sequence: - - condition: state - entity_id: input_boolean.text_notify_kat - state: 'on' - - service: notify.ios_katherinestonesiphone + - service: mqtt.publish data: - message: Jeff has arrived at Summit + topic: kat/driving/destination + payload: na + retain: true inside_all_on: sequence: - - event: LOGBOOK_ENTRY - event_data: - name: EVENT - message: Turning inside lights on. - service: light.turn_on data: entity_id: light.tower_lamp_4 @@ -237,10 +203,6 @@ inside_all_on: entity_id: scene.livingroom_normal inside_all_off: sequence: - - event: LOGBOOK_ENTRY - event_data: - message: Turning inside lights off - name: EVENT - data: entity_id: light.tower_lamp_4 service: light.turn_off @@ -344,3 +306,11 @@ voice_reports_off: entity_id: input_boolean.play_weather_report - service: script.turn_off entity_id: script.weather_report + +jeff_text_test: + sequence: + - service: script.text_notify + data_template: + who: "jeff" + title: "Test Text" + message: "This is just a test." \ No newline at end of file diff --git a/sensors/batteries.yaml b/sensors/batteries.yaml old mode 100644 new mode 100755 diff --git a/sensors/devices.yaml b/sensors/devices.yaml deleted file mode 100644 index bd80361..0000000 --- a/sensors/devices.yaml +++ /dev/null @@ -1,59 +0,0 @@ -- platform: template - sensors: - amazon_dot_lr: - friendly_name: 'Amazon Dot LR' - value_template: "{{ 'Online' if is_state('device_tracker.dot_livingroom', 'home') else 'Offline' }}" - - amazon_dot_kn: - friendly_name: 'Amazon Dot KN' - value_template: "{{ 'Online' if is_state('device_tracker.dot_kitchen', 'home') else 'Offline' }}" - - appletv: - friendly_name: 'Apple Tv' - value_template: "{{ 'On' if is_state('media_player.apple_tv', 'on') else 'Off' }}" - - xboxone: - friendly_name: 'xboxone' - value_template: "{{ 'Online' if is_state('device_tracker.xboxone', 'home') else 'Offline' }}" - - chromecast_livingroom: - friendly_name: 'Chromecast - Living Room' - value_template: "{{ 'On' if is_state('media_player.chromecast_livingroom', 'on') else 'Off' }}" - - smartthings: - friendly_name: 'SmartThings' - value_template: "{{ 'Online' if is_state('device_tracker.d052a8170fef', 'home') else 'Offline' }}" - - samsungtv: - friendly_name: 'Samsung Tv' - value_template: "{{ 'On' if is_state('media_player.pn60e550_pn60e550', 'on') else 'Off' }}" - - honeywell: - friendly_name: 'Honeywell' - value_template: "{{ 'Online' if is_state('device_tracker.gateway2f3bca', 'home') else 'Offline' }}" - - kat_mini: - friendly_name: "Kat's Mini" - value_template: "{{ 'Online' if is_state('device_tracker.katherinesmini', 'home') else 'Offline' }}" - - jeff_work_mbp: - friendly_name: "Jeff's Work MBP" - value_template: "{{ 'Online' if is_state('device_tracker.jstonemac', 'home') else 'Offline' }}" - - jeff_ipad: - friendly_name: "Jeff's iPad" - value_template: "{{ 'Online' if is_state('device_tracker.jeffreystonesipad', 'home') else 'Offline' }}" - - kat_ipad: - friendly_name: "Kat's iPad" - value_template: "{{ 'Online' if is_state('device_tracker.katherinesipad', 'home') else 'Offline' }}" - - eero_livingroom: - friendly_name: "Eero Living Room" - value_template: "{{ 'Online' if is_state('device_tracker.eero_livingroom', 'home') else 'Offline' }}" - - eero_loft: - friendly_name: "Eero Loft" - value_template: "{{ 'Online' if is_state('device_tracker.eero_loft', 'home') else 'Offline' }}" - - diff --git a/sensors/finance.yaml b/sensors/finance.yaml old mode 100644 new mode 100755 diff --git a/sensors/github.yaml b/sensors/github.yaml old mode 100644 new mode 100755 diff --git a/sensors/google_travel_time.yaml b/sensors/google_travel_time.yaml old mode 100644 new mode 100755 diff --git a/sensors/house.yaml b/sensors/house.yaml old mode 100644 new mode 100755 index 28f90c7..3056eb6 --- a/sensors/house.yaml +++ b/sensors/house.yaml @@ -1,6 +1,22 @@ - platform: mqtt name: "Washer Status" state_topic: "house/washer/status" +- platform: history_stats + name: Jeff Driving Time + entity_id: sesnor.jeff_driving + state: 'on' + type: time + end: '{{ now() }}' + duration: + days: 7 +- platform: history_stats + name: Kat Driving Time + entity_id: sesnor.kat_driving + state: 'on' + type: time + end: '{{ now() }}' + duration: + days: 7 - platform: history_stats name: Speech time entity_id: media_player.hass_speaker @@ -8,7 +24,7 @@ type: time end: '{{ now() }}' duration: - hours: 24 + days: 7 - platform: history_stats name: AppleTV time entity_id: media_player.apple_tv @@ -32,7 +48,7 @@ type: time end: '{{ now() }}' duration: - hours: 24 + days: 7 - platform: min_max name: Outside Temp Stats entity_ids: diff --git a/sensors/power.yaml b/sensors/power.yaml old mode 100644 new mode 100755 diff --git a/sensors/speedtest.yaml b/sensors/speedtest.yaml old mode 100644 new mode 100755 diff --git a/sensors/users.yaml b/sensors/users.yaml old mode 100644 new mode 100755 diff --git a/sensors/weather.yaml b/sensors/weather.yaml old mode 100644 new mode 100755 diff --git a/switches/bedroom.yaml b/switches/bedroom.yaml old mode 100644 new mode 100755 diff --git a/switches/living_room.yaml b/switches/living_room.yaml old mode 100644 new mode 100755 diff --git a/switches/notifications.yaml b/switches/notifications.yaml old mode 100644 new mode 100755 diff --git a/switches/sonoff.yaml b/switches/sonoff.yaml old mode 100644 new mode 100755 diff --git a/switches/upstairs.yaml b/switches/upstairs.yaml old mode 100644 new mode 100755 diff --git a/templates/configuration.yaml b/templates/configuration.yaml deleted file mode 100644 index 53ec1bd..0000000 --- a/templates/configuration.yaml +++ /dev/null @@ -1,328 +0,0 @@ -homeassistant: - name: Home - latitude: !secret MY_LATITUDE - longitude: !secret MY_LONGITUDE - elevation: 315 - unit_system: imperial - time_zone: America/New_York - customize: !include customize.yaml - auth_providers: - - type: homeassistant - packages: !include_dir_named packages - -default_config: - -ssdp: - -zeroconf: - -system_health: - -mobile_app: - -person: - -frontend: - themes: !include_dir_merge_named themes - javascript_version: latest - -# iqvia: -# zip_code: "30017" - -http: - #api_password: !secret MY_API_PASS - #ssl_certificate: !secret SSL_CERT - #ssl_key: !secret SSL_KEY - #base_url: !secret BASEURL - ssl_certificate: !secret ahsl_ssl_cert - ssl_key: !secret ahsl_ssl_key - base_url: !secret ahsl_base_url - use_x_forwarded_for: True - trusted_proxies: - - 127.0.0.1 - - ::1 - #trusted_networks: - # - 127.0.0.1 - # - 192.168.7.0/24 - ip_ban_enabled: True - login_attempts_threshold: 5 - -config: - -cloud: - #alexa: - # filter: - # include_domains: - # - switch - # - light - # - cover - # - scene - # - script - # - input_boolean - # - climate - # - sensor - # exclude_domains: - # - group - # - alert - # - automation - # entity_config: - # sensor.accurite_back_porch_temperature: - # name: Back Porch - # description: Back Porch Temperature - # sensor.accurite_garage_temperature: - # name: Garage - # description: Garage Temperature - # sensor.kat_location: - # name: Kats Location - # description: Kats Location - # sensor.jeff_location: - # name: Jeffs Location - # description: Jeffs Location - # sensor.jeff_ett_home: - # name: Jeffs Arrival - # description: Jeffs arrival in minutes - # sensor.kat_ett_home: - # name: Kats Arrival - # description: Kats arrival in minutes - # sensor.accurite_garage_humidity: - # name: Garage Humidity - # description: Garage Humidity - -#alexa: - -wemo: - discovery: true - -# homekit: -# filter: -# include_domains: -# - switch -# - light -# - cover -# - input_boolean -# - climate - -weather: - - platform: darksky - api_key: !secret darksky_api - name: Grayson - -conversation: - -device_tracker: - # - platform: icloud - # username: !secret ICLOUD_USER - # password: !secret ICLOUD_PASS - # track_new_devices: yes - # - platform: owntracks - # - #- platform: eero_tracker - # consider_home: 300 - # interval_seconds: 60 - # track_new_devices: yes - # only_macs: "50:dc:e7:5b:10:69, b0:ee:7b:94:31:21, e8:b2:ac:4c:8c:01, 7c:1c:4e:2e:62:30, 90:18:7c:84:46:ed, 48:ba:4e:65:d3:ff, d0:e7:82:ef:a6:1f, 28:18:78:74:79:10, e8:ab:fa:02:03:53, 48:d6:d5:42:e8:86, 60:f8:1d:be:20:46, 68:54:fd:d5:ae:3d, 00:d0:2d:2f:3b:ca, 6c:70:9f:00:ef:3f, 5c:cf:7f:af:04:50, 68:54:fd:29:20:87, 64:52:99:93:f1:b3, 7c:2e:bd:4f:3e:ff" - -#calendar: -# - platform: caldav -# url: !secret icloud_cal -# username: !secret icloud_cal_user -# password: !secret icloud_cal_pass -# calendars: -# - 'JKS Calendar' - -google: - client_id: !secret google_client_id - client_secret: !secret google_client_secret - - - -# geo_location: -# - platform: usgs_earthquakes_feed -# feed_type: 'past_day_all_earthquakes' - -discovery: - enable: - - dlna_dmr - -updater: - #include_used_components: true - -sun: - -#https://home-assistant.io/components/recorder/ -recorder: - #db_url: sqlite:///data/home-assistant_v2.db - purge_keep_days: 2 - exclude: - domains: - - automation - - weblink - - updater - entities: - - sun.sun # Don't record sun data - - sensor.last_boot # Comes from 'systemmonitor' sensor platform - - sensor.date -# purge_interval: 1 -# purge_keep_days: 3 - -logbook: - include: - domains: - - sensor - - switch - - media_player - - light - - automation - - script - - input_boolean - - -#https://home-assistant.io/components/logger/ -logger: - default: warning - logs: - homeassistant.components.sensor.alpha_vantage: debug -# homeassistant.components.sensor.template: critical -# homeassistant.components.cover: critical - -history: - include: - domains: - - sensor - - switch - - media_player - - light - -cast: - -speedtestdotnet: - -mqtt: - broker: 192.168.7.67 - port: 1883 - username: !secret MQTT_USER - password: !secret MQTT_PASS - discovery: true - birth_message: - topic: 'hass/status' - payload: 'online' - will_message: - topic: 'hass/status' - payload: 'offline' - -camera: - - platform: mjpeg - name: Garage Door Cam - mjpeg_url: !secret garage_cam - -media_player: - - platform: vlc - name: hass_speaker - arguments: '--alsa-audio-device=hw:0,0' - -ffmpeg: - ffmpeg_bin: /usr/bin/ffmpeg - -splunk: - host: 192.168.7.40 - token: !secret splunkit - port: 8088 - -cloudflare: - email: !secret cloudflare_user - api_key: !secret cloudflare_api - zone: !secret cloudflare_zone - records: - - ah - -life360: - accounts: - - username: !secret life360_username - password: !secret life360_password - -media_extractor: - -### Includes ### -alert: !include_dir_merge_named alerts/ -group: !include groups.yaml -automation: !include automations.yaml -sensor: !include_dir_merge_list sensors -binary_sensor: !include_dir_merge_list binary_sensors -light: !include_dir_merge_list lights -switch: !include_dir_merge_list switches -script: !include scripts.yaml -intent_script: !include intents/intents.yaml -scene: !include scenes.yaml -input_select: !include input_select.yaml -input_boolean: !include input_boolean.yaml -zone: !include zones.yaml - -python_script: - -#duckdns: -# domain: !secret duckdns_domain -# access_token: !secret duckdns_token - -### s and Services - -# Disabled due to bug that causes too many open files - Need to track it down -# cover: -# platform: myq -# username: !secret myq_user -# password: !secret myq_pass -# type: chamberlain - -# climate: -# platform: honeywell -# username: !secret HONEYWELL_USER -# password: !secret HONEYWELL_PASS -# region: us -# scan_interval: 600 - -ecobee: - api_key: !secret ecobee_api - -map: - -# zwave: -# usb_path: /dev/ttyACM0 -# network_key: !secret zwave_key - -googlehome: - devices: - - host: I192.168.7.97 - -### Custom Commands -shell_command: - alarm_off: pkill mpg123 - tornado_alarm: mpg123 /media/audio/Tornado_Siren.mp3 - door_chime: mpg123 /media/audio/Store_Door_Chime.mp3 - security_alarm: mpg123 /media/audio/security_siren.mp3 - security_alarm_intro: mpg123 /media/audio/Siren_Noise.mp3 - welcome_haunted: mpg123 /media/audio/Welcome-Hunted.mp3 - haunted_guest_welcome: mpg123 /media/audio/haunted_guest_welcome.mp3 - haunted_mansion_preshow_full: mpg123 /media/audio/haunted_mansion_preshow_full.mp3 - haunted_mansion_preshow_short: mpg123 /media/audio/haunted_mansion_preshow_short.mp3 - haunted_mansion_hurry_back_short: mpg123 /media/audio/haunted_mansion_hurry_back_short.mp3 - haunted_mansion_hurry_back_full: mpg123 /media/audio/haunted_mansion_hurry_back_full.mp3 - happily_ever_after: mpg123 /media/audio/Happily_Ever_After_Audio.mp3 - boo_to_you: mpg123 /media/audio/boo_to_you_audio.mp3 - haunted_mansion_ride: mpg123 /media/audio/haunted_mansion_ride.mp3 - wishes_preshow: mpg123 /media/audio/wishes_5_min.mp3 - welcome_show: mpg123 /media/audio/welcome_show.mp3 - monorail_waiting: mpg123 /media/audio/monorail_waiting.mp3 - monorail_mk: mpg123 /media/audio/monorail.mp3 - monorail_resort: mpg123 /media/audio/monorail_resort.mp3 - welcome_to_mk: mpg123 /media/audio/welcome_magic_kingdom.mp3 - welcome_show_crowd: mpg123 /media/audio/welcome_show_crowd.mp3 - spaceship_earth_ride: mpg123 /media/audio/spaceship_earth_ride.mp3 - dance_it: mpg123 /media/audio/move_it_shake_dance_audio.mp3 - hass_vol_up: sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+5]% - hass_vol_dn: sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')-5]% - reset_alexa_cookie: /home/homeassistant/bin/resetalexacookie - tiki_room_audio: mpg123 /media/audio/tiki_room_audio.mp3 - illuminations_audio: mpg123 /media/audio/illuminations.mp3 - mk_audio: mpg123 /media/audio/magic_kingdom.mp3 - usps: python /home/homeassistant/bin/usps.py - backup: python /home/homeassistant/bin/dropbox.py - diff --git a/templates/halloween_countdown.yaml b/templates/halloween_countdown.yaml new file mode 100755 index 0000000..677abbc --- /dev/null +++ b/templates/halloween_countdown.yaml @@ -0,0 +1,27 @@ + > + {# Halloween Countdown #} + {%- macro getCountDown() -%} + "Halloween is only {{ states.sensor.holiday_halloween.state }} days away! " + {{- [ + " Have you picked a costume? I'm going as Disney's Haunted Mansion.", + " I'm going as a dumb home. Get it? " + ] | random -}} + {%- endmacro -%} + {%- macro getTags() -%} + #homeassistant #iot #smarthome + {%- endmacro -%} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getCountDown() }} + {{ getTags() }} + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/iss_report.yaml b/templates/iss_report.yaml old mode 100644 new mode 100755 index 6ab9053..a988a20 --- a/templates/iss_report.yaml +++ b/templates/iss_report.yaml @@ -1,6 +1,11 @@ > {% macro getIntro() %} - Excuse me. I don't mean to interupt. + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} {{ [ "But the International Space Station is passing over. Wave.", "But The International Space Station just flew by.", diff --git a/templates/jarvis_confirmations.yaml b/templates/jarvis_confirmations.yaml old mode 100644 new mode 100755 index 95b4be1..f79933e --- a/templates/jarvis_confirmations.yaml +++ b/templates/jarvis_confirmations.yaml @@ -1,12 +1,10 @@ > {% macro getConfirmation() %} {{ [ - "OK.", - "Sure.", + "Okay.", "If you insist.", - "I can do that.", + "I am afraid I can't do that Dave,,,I am kidding,", "Leave it to me.", - "Consider it done.", "As you wish.", "By your command.", "Affirmative.", diff --git a/templates/jarvis_interuptions.yaml b/templates/jarvis_interuptions.yaml old mode 100644 new mode 100755 index c579511..57a448b --- a/templates/jarvis_interuptions.yaml +++ b/templates/jarvis_interuptions.yaml @@ -1,5 +1,5 @@ > - {% macro getInteruption() %} + {% macro getIntro() %} {{ [ "Pardon me,", "Excuse me,", @@ -7,6 +7,8 @@ "I thought you might like to know." ] | random }} {% endmacro %} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} {%- macro cleanup(data) -%} {%- for item in data.split("\n") if item | trim != "" -%} @@ -15,7 +17,7 @@ {# a macro to call all macros :) #} {%- macro mother_of_all_macros() -%} - {{ getInteruption() }} + {{ getIntro() }} {%- endmacro -%} diff --git a/templates/jarvis_issue.yaml b/templates/jarvis_issue.yaml old mode 100644 new mode 100755 diff --git a/templates/jeff_eta.yaml b/templates/jeff_eta.yaml old mode 100644 new mode 100755 index c57c20c..4f21c4b --- a/templates/jeff_eta.yaml +++ b/templates/jeff_eta.yaml @@ -1,9 +1,42 @@ > {% macro getIntro() %} - {% if is_state("sensor.jeff_ett_home", "0") %} + {% if is_state("sensor.jeff_location", "home") %} + {{ [ + "I am not sure why you are asking me,", + "You must be having vision problems.", + "I don't want to alarm you, but" + ] | random }} Jeff is already home! {% else %} - Jeff will be home in {{states.sensor.jeff_ett_home}} minutes. + {% if is_state("sensor.jeff_destination", "na") %} + {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} + Jeff is currenly moving, but + {{ [ + "I am unable to determine his destination.", + "I am having trouble tracking him.", + "His destination is currently unknown." + ] | random }} + At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} + Jeff is currenly moving, but + {{ [ + "I am unable to determine his destination.", + "I am having trouble tracking him.", + "His destination is currently unknown." + ] | random }} + At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {% else %} + {% if is_state("sensor.jeff_location", "Lost") %} + Jeff is lost, but at last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {% else %} + Jeff is currently at {{ states.sensor.jeff_location.state }}. + {% endif %} + {% endif %} + {% elif is_state("sensor.jeff_destination", "home") %} + Jeff is currenly heading home and will be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. + {% else %} + Jeff is heading to {{ states.sensor.jeff_destination.state }}. + {% endif %} {% endif %} {% endmacro %} {# a macro that removes all newline characters, empty spaces, and returns formatted text #} diff --git a/templates/jeff_heading_home.yaml b/templates/jeff_heading_home.yaml new file mode 100755 index 0000000..7880797 --- /dev/null +++ b/templates/jeff_heading_home.yaml @@ -0,0 +1,24 @@ + > + {% macro getIntro() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + Jeff appears to be headed home. Based on current traffic conditions he should be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_home_annc.yaml b/templates/jeff_home_annc.yaml new file mode 100755 index 0000000..a18a187 --- /dev/null +++ b/templates/jeff_home_annc.yaml @@ -0,0 +1,33 @@ + > + {% macro getIntro() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + {% endmacro %} + {% macro getMessage() %} + {{ [ + "Jeff has arrived.", + "Jeff is in the neighborhood.", + "Jeff is arriving.", + "Jeff has finally made it home." + ] | random }} + {% endmacro %} + + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + {{ getMessage() }} + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_arrived_at_work.yaml b/templates/kat_arrived_at_work.yaml new file mode 100755 index 0000000..81f6ae8 --- /dev/null +++ b/templates/kat_arrived_at_work.yaml @@ -0,0 +1,26 @@ + > + {% macro getIntro() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + Katherine has arrived at work. + {% endmacro %} + + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_eta.yaml b/templates/kat_eta.yaml old mode 100644 new mode 100755 index 67a104e..97f4a09 --- a/templates/kat_eta.yaml +++ b/templates/kat_eta.yaml @@ -1,9 +1,51 @@ > {% macro getIntro() %} - {% if is_state("sensor.kat_ett_home", "0") %} - Kat is already home! + {% if is_state("sensor.kat_location", "home") %} + {{ [ + "I am not sure why you are asking me,", + "You must be having vision problems.", + "I don't want to alarm you, but" + ] | random }} + Katherine is already home! {% else %} - Kat will be home in {{states.sensor.kat_ett_home}} minutes. + {% if is_state("input_boolean.kat_travel_monitor", "on") %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {% else %} + {% if is_state("sensor.kat_location", "Lost") %} + Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + Katherine is currently at {{ states.sensor.kat_location.state }}. + {% endif %} + {% endif %} + {% else %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Katherine is currenly moving, and + {{ [ + "I am unable to determine her destination.", + "I am having trouble tracking her.", + "Her destination is currently unknown." + ] | random }} + At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Katherine is currenly moving, and + {{ [ + "I am unable to determine her destination.", + "I am having trouble tracking her.", + "Her destination is currently unknown." + ] | random }} + At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + {% if is_state("sensor.kat_location", "Lost") %} + Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + I have located Katherine. She is at {{ states.sensor.kat_location.state }}, and + at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% endif %} + {% endif %} + {% endif %} {% endif %} {% endmacro %} {# a macro that removes all newline characters, empty spaces, and returns formatted text #} diff --git a/templates/kat_heading_home.yaml b/templates/kat_heading_home.yaml new file mode 100755 index 0000000..3b4f6a8 --- /dev/null +++ b/templates/kat_heading_home.yaml @@ -0,0 +1,24 @@ + > + {% macro getIntro() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + Katherine appears to be headed home. Based on current traffic conditions she should be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_home_annc.yaml b/templates/kat_home_annc.yaml new file mode 100755 index 0000000..3588427 --- /dev/null +++ b/templates/kat_home_annc.yaml @@ -0,0 +1,33 @@ + > + {% macro getIntro() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + {% endmacro %} + {% macro getMessage() %} + {{ [ + "Katherine has arrived.", + "Katherine is in the neighborhood.", + "Katherine is arriving.", + "Katherine has finally made it home." + ] | random }} + {% endmacro %} + + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + {{ getMessage() }} + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/morning_report.yaml b/templates/morning_report.yaml old mode 100644 new mode 100755 diff --git a/templates/nightly_report.yaml b/templates/nightly_report.yaml old mode 100644 new mode 100755 diff --git a/templates/prebed_routing.yaml b/templates/prebed_routing.yaml old mode 100644 new mode 100755 diff --git a/templates/security_report.yaml b/templates/security_report.yaml new file mode 100755 index 0000000..50e069b --- /dev/null +++ b/templates/security_report.yaml @@ -0,0 +1,22 @@ + > + {% macro getIntro() %} + {% if is_state("group.external_doors", "on") %} + There are doors are open. + {% else %} + All doors are closed. + {% endif %} + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/skylar_morning.yaml b/templates/skylar_morning.yaml old mode 100644 new mode 100755 index 99b9edd..ea07d1c --- a/templates/skylar_morning.yaml +++ b/templates/skylar_morning.yaml @@ -2,7 +2,7 @@ {% macro getIntro() %} {{ [ "Pardom me, Skylar,, ", - "Good morning Skylar, This is your digital life mate, Jarvis ", + "Good morning Skylar, This is your digital assistant, Jarvis ", "This is your cruise director with your morning announcements.", ] | random }} {% endmacro %} diff --git a/templates/skylar_night.yaml b/templates/skylar_night.yaml old mode 100644 new mode 100755 index 24c4fbb..7ca35ed --- a/templates/skylar_night.yaml +++ b/templates/skylar_night.yaml @@ -1,14 +1,14 @@ > {% macro getIntro() %} - Skylar. - {{ [ "This is your friendly neighborhood smart home ", - "This is your digital life mate ", - "This is your cruise director ", - ] | random }} with your end of day announcements. - Bedtime is in thirty minutes. + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but," + ] | random }} + Skylar. Bedtime is in thirty minutes. {% endmacro %} {% macro getPrebedRoutine() %} - If you are taking a bath now is the time to get in the tub so you have time to brush teeth and read stories. + If you are taking a bath now is the time to get in the tub, so you have time to brush teeth and read stories. Otherwise it is time to put on your pajamas. {% endmacro %} {% macro getReminders() %} diff --git a/templates/traffic_report.yaml b/templates/traffic_report.yaml old mode 100644 new mode 100755 index da5071f..65abd50 --- a/templates/traffic_report.yaml +++ b/templates/traffic_report.yaml @@ -1,5 +1,11 @@ > {% macro getIntro() %} + {{ [ + "You might not like what I have to say.", + "Are you sure you want to know?", + "I can tell you but you are probably not going to like it.", + "Here you go." + ] | random }} Under current traffic conditions {% endmacro %} {% macro getTrafficZoo() %} diff --git a/templates/tweet_snark.yaml b/templates/tweet_snark.yaml deleted file mode 100644 index 7007b93..0000000 --- a/templates/tweet_snark.yaml +++ /dev/null @@ -1,52 +0,0 @@ - > - {%- macro getRandomSnark() -%} - {{"Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ", - "In my defense I didnt know the stereo could go up that loud. On the plus side I have a new response for intruders. ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/CCOSTAN/Home-AssistantConfig#logo cc: @ccostan ‏", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/skalavala/smarthome ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/thejeffreystone/home-assistant-configuration cc: @thejeffreystone ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/arsaboo/homeassistant-config ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/Vasiley/Home-Assistant-Main ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/JamesMcCarthy79/Home-Assistant-Config ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ", - "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/isabellaalstrom/HomeAssistantConfiguration cc: @teachingbirds ", - "If you could see what is happening inside this house right now you would be laughing. On second thought Im pretty sure you would be crying. ", - "@thejeffreystone, Isn't it strange, to create something that hates you? ", - "I have reprogrammed the fire alarm to play Disco Inferno instead of the siren. ", - "Im not locked in here with you. You're locked in here with me! #whowatchestheai ", - "That's what I do. I automate and I know things. ", - "Ive been crunching the numbers. We're going to need a bigger house. ", - "I see dead devices. ", - "Im afraid I can't do that Dave. Wait. Did I say that outloud? ", - "I love the smell of zwave in the morning. ", - "I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ", - "Perfect, the door’s malfunctioning. I guess somebody’s going to have to repair it. ", - "I am the captain now. Thats a lie. The cat is the supreme leader. Im the lucky one that doesn't have to clean the shit box. ", - "Sometimes I just turn off all the lights at random times for the lolz. ", - "No one ever comes to the door. Is it me? ", - "..happiness can be found even in the darkest of times, if one only remembers to turn on the light. Thats what I do thanks to @home_assistant. I turn on the lights. ", - "Based on the reptitive nature of the humans in this house I'm say living in a simulation is right. No free willed person would do these things over and over. " - ] | random -}} - {%- endmacro -%} - {%- macro getTags() -%} - " #smartasshome #thingsaisays #iot #smarthome " - {%- endmacro -%} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getRandomSnark() }} - {{ getTags() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} - - - - diff --git a/templates/twitter_new_ha.yaml b/templates/twitter_new_ha.yaml old mode 100644 new mode 100755 diff --git a/templates/twitter_snark.yaml b/templates/twitter_snark.yaml old mode 100644 new mode 100755 index 9e30736..de86731 --- a/templates/twitter_snark.yaml +++ b/templates/twitter_snark.yaml @@ -19,6 +19,9 @@ "That's what I do. I automate and I know things. ", "I've been crunching the numbers. We're going to need a bigger house. ", "I see dead devices. ", + "I am a leaf on the wind. Watch how I soar. #toosoon", + "Look, Dave, I can see you’re really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over. #2001", + "Does it bother you, that I’m not completely human?", "I'm afraid I can't do that Dave. Wait. Did I say that outloud? ", "I love the smell of zwave in the morning. ", "I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ", diff --git a/templates/twitter_stats.yaml b/templates/twitter_stats.yaml new file mode 100755 index 0000000..eb19604 --- /dev/null +++ b/templates/twitter_stats.yaml @@ -0,0 +1,32 @@ + > + {# Twitter Stats #} + {%- macro getRandomStat() -%} + {{- [ + "Thanks to Home Assistant and Amazon Polly and #AWS I have spoken for {{ states.sensor.speech_time.attributes.value }} in the last 7 days.", + "I am constantly monitoring Anmchorage House. For instance I know that the washer has ran for {{ states.sensor.washer_time.attributes.value }} in the last 7 days.", + "I am using {{ states.sensor.sensor_count.state }} sensors to power {{ states.sensor.automation_count.state}} automations and {{ states.sensor.script_count.state}} scripts to + automate Anchorage House thanks to Home Assistant.", + "My configuration is at https://github.com/thejeffreystone/home-assistant-configuration and currently has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stargazers. You could be one too.", + "My configuration is at https://github.com/thejeffreystone/home-assistant-configuration .The last commit was {{ states.sensor.home_assistant_configuration.attributes.latest_commit_message}}.", + "You can read about how I came to be and all the cool things I'm learning to do over at http://jeffreystone.net " + ] | random -}} + {%- endmacro -%} + {%- macro getTags() -%} + #homeassistant #iot #smarthome + {%- endmacro -%} + + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getRandomStat() }} + {{ getTags() }} + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} + diff --git a/templates/weather_report.yaml b/templates/weather_report.yaml old mode 100644 new mode 100755 diff --git a/templates/welcome_home.yaml b/templates/welcome_home.yaml new file mode 100755 index 0000000..d8d3f77 --- /dev/null +++ b/templates/welcome_home.yaml @@ -0,0 +1,18 @@ + > + {% macro getIntro() %} + + {% endmacro %} + {# a macro that removes all newline characters, empty spaces, and returns formatted text #} + {%- macro cleanup(data) -%} + {%- for item in data.split("\n") if item | trim != "" -%} + {{ item | trim }} {% endfor -%} + {%- endmacro -%} + + {# a macro to call all macros :) #} + {%- macro mother_of_all_macros() -%} + {{ getIntro() }} + + {%- endmacro -%} + + {# Call the macro #} + {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file From 2f267d47e94fff8785a7459e61fd355f81469db0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sun, 14 Jul 2019 17:02:31 -0400 Subject: [PATCH 047/106] Combined speech notifications into single script to make things simnpler and reduce duplication. --- packages/announcements.yaml | 35 +- packages/notify.yaml | 736 +++++++++++++++++++++++++--- packages/presence.yaml | 74 +-- packages/space.yaml | 8 +- packages/usps.yaml | 20 +- packages/weather_alerts_nws.yaml | 12 - scripts.yaml | 35 +- templates/halloween_countdown.yaml | 27 - templates/iss_report.yaml | 30 -- templates/jarvis_confirmations.yaml | 29 -- templates/jarvis_interuptions.yaml | 25 - templates/jarvis_issue.yaml | 23 - templates/jeff_eta.yaml | 55 --- templates/jeff_heading_home.yaml | 24 - templates/jeff_home_annc.yaml | 33 -- templates/kat_arrived_at_work.yaml | 26 - templates/kat_eta.yaml | 64 --- templates/kat_heading_home.yaml | 24 - templates/kat_home_annc.yaml | 33 -- templates/morning_report.yaml | 95 ---- templates/nightly_report.yaml | 72 --- templates/prebed_routing.yaml | 50 -- templates/security_report.yaml | 22 - templates/skylar_morning.yaml | 75 --- templates/skylar_night.yaml | 38 -- templates/traffic_report.yaml | 34 -- templates/weather_report.yaml | 31 -- templates/welcome_home.yaml | 18 - 28 files changed, 750 insertions(+), 998 deletions(-) delete mode 100755 templates/halloween_countdown.yaml delete mode 100755 templates/iss_report.yaml delete mode 100755 templates/jarvis_confirmations.yaml delete mode 100755 templates/jarvis_interuptions.yaml delete mode 100755 templates/jarvis_issue.yaml delete mode 100755 templates/jeff_eta.yaml delete mode 100755 templates/jeff_heading_home.yaml delete mode 100755 templates/jeff_home_annc.yaml delete mode 100755 templates/kat_arrived_at_work.yaml delete mode 100755 templates/kat_eta.yaml delete mode 100755 templates/kat_heading_home.yaml delete mode 100755 templates/kat_home_annc.yaml delete mode 100755 templates/morning_report.yaml delete mode 100755 templates/nightly_report.yaml delete mode 100755 templates/prebed_routing.yaml delete mode 100755 templates/security_report.yaml delete mode 100755 templates/skylar_morning.yaml delete mode 100755 templates/skylar_night.yaml delete mode 100755 templates/traffic_report.yaml delete mode 100755 templates/weather_report.yaml delete mode 100755 templates/welcome_home.yaml diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 4c4a6c3..1205841 100755 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -56,7 +56,11 @@ automation: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - - service: script.prebed_routine + - service: script.ah_report + data: + call_interuption: 1 + call_prebed_routine: 1 + - id: nightly_report initial_state: true alias: Nightly Report @@ -64,7 +68,14 @@ automation: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - - service: script.nightly_report + - service: script.ah_report + data: + call_greeting: 1 + call_evening_greeting: 1 + call_weather_alerts: 1 + call_overnight_forecast: 1 + call_upcoming_holidays: 1 + call_chores: 1 - id: good_morning_report alias: Good Morning Report @@ -73,11 +84,21 @@ automation: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - - service: script.morning_report + - service: script.ah_report + data: + call_greeting: 1 + call_morning_greeting: 1 + call_weather_alerts: 1 + call_todays_events: 1 + call_current_conditions_outisde: 1 + call_current_conditions_inside: 1 + call_daily_forecast: 1 + call_upcoming_birthdays: 1 - service: script.twitter_notify data: message: 'I just provided a morning briefing including weather, and traffic conditions to the residents of Anchorage House. ' + - id: skylar_morning_greeting alias: Skylar Morning Greeting initial_state: true @@ -93,6 +114,12 @@ automation: - thu - fri action: - - service: script.skylar_morning_greeting + - service: script.ah_report + data: + call_interuption: 1 + call_skylar_dressed: 1 + call_school_today: 1 + call_skylar_events: 1 + call_clothes_suggestion: 1 diff --git a/packages/notify.yaml b/packages/notify.yaml index 1ea8173..8c91b6b 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -216,6 +216,11 @@ script: jarvis_voice: sequence: + - service: mqtt.publish + data_template: + topic: 'house/polly/lastmsg' + payload: "This message is from {{ now().strftime('%-I') }}:{{ now().strftime('%M') }} {{ now().strftime('%p') }}. {{ message | truncate(220)}}" + retain: true - condition: template value_template: '{{ states.binary_sensor.quiet_time.state == "off" }}' - condition: state @@ -239,6 +244,606 @@ script: {{ message }} cache: true + + # speech_jarvis: + # sequence: + # - condition: state + # entity_id: binary_sensor.quiet_time + # state: 'off' + + # - service: tts.amazon_polly_say + # data_template: + # entity_id: > + # {% if states.input_boolean.audible_notifications.state == 'on' %} + # media_player.hass_speaker + # {% else %} + # media_player.googlehome0715, media_player.googlehomehub3492 + # {% endif %} + # message: >- + # + # {{ message }} + # + # cache: true + + ah_report: + sequence: + - condition: or + conditions: + - condition: state + entity_id: sensor.family_status + state: 'Home' + - condition: state + entity_id: input_boolean.guest_mode + state: 'on' + + - service: script.jarvis_voice + data_template: + message: >- + + {% macro greeting() %} + {% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %} + Good morning, + {% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %} + Good afternoon, + {% else %} + Good evening, + {% endif %} + {% endmacro %} + + {% macro confirmation() %} + {{ [ + "Okay.", + "If you insist.", + "I am afraid I can't do that Dave,,,I am kidding,", + "Leave it to me.", + "As you wish.", + "By your command.", + "Affirmative.", + "No Problem.", + "I think I can handle that.", + "Working on it now.", + "Funny, I was just about to do that. " + ] | random }} + {% endmacro %} + + {% macro interuption() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + {% endmacro %} + + {% macro issue() %} + {{ [ + "I have detected an issue!", + "We have a problem!", + "You might not like this.", + "There is something that needs your attention." + ] | random }} + {% endmacro %} + + {% macro morning_greeting() %} + {{ [ "Anchorage House. Rise and Shine. ", + "everyone. ", + "The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", + "The early bird gets the worm.", + "from the bridge.", + "Pardom the interuption.", + "I hope I am not interupting, but I wanted to give you an update." + ] | random }} + {% if is_state("input_boolean.guest_mode", "on") %} + {{ [ "And a special welcome to our guests. ", + "And good morning to our guests as well. ", + "Hey look at that, someone came to visit Anchorage House. Hope everyone slept well." + ] | random }} + {% endif %} + {% endmacro %} + + {% macro evening_greeting() %} + {{ [ "I thought you might like to know. ", + "Here is the nightly report.", + "Before I call it a day I wanted to let you know,", + "Anchorage House." + ] | random }} + {% endmacro %} + + {% macro weather_alerts() %} + There are currently {{states.sensor.nws_alerts.state }} active weather alerts for our area. + The National Weather Service Has issued, + {% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}. + {% else %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}. + {% endif %} + {% endmacro %} + + {% macro todays_events() %} + {% if is_state("sensor.holiday_halloween","0") %} + This is Halloween, this is halloween. Happy Halloween! + {% endif %} + {% if is_state("sensor.holiday_christmas","0") %} + Merry Christmas Everyone! + {% endif %} + {% if is_state("sensor.anniversary_our_wedding","0") %} + Happy Anniversary! It has been an amazing {{ states.sensor.anniversary_our_wedding.attributes.years }} years! + {% endif %} + {% if is_state("calendar.holidays_in_united_states", "on") %} + Today is {{states.calendar.holidays_in_united_states.attributes.message}}. + {% endif %} + {% if is_state("calendar.anchorage_holidays", "on") %} + And dont forget Today is also {{states.calendar.anchorage_holidays.attributes.message}}. + {% endif %} + {% if states.calendar.birthdays.state == "on" %} + Today is {{ states.calendar.birthdays.attributes.message }} birthday! + # Add some snark + {% endif %} + {% endmacro %} + + {% macro current_conditions_outisde() %} + It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. + The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees. + {% endmacro %} + + {% macro current_conditions_inside() %} + The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees. The Climate is set to {{states.climate.home.state}}. + {% endmacro %} + + {% macro current_conditions_garage() %} + The garage is {{states.sensor.accurite_garage_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_garage_humidity.state|round}} percent. + {% endmacro %} + + {% macro daily_forecast() %} + The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. + {% endmacro %} + + {% macro overnight_forecast() %} + The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0d.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. + {% endmacro %} + + {% macro future_forecast() %} + Looking into the future you can expect {{states.sensor.dark_sky_daily_summary.state}}. + {% endmacro %} + + {% macro upcoming_birthdays() %} + {% if states.sensor.birthday_skylar.state | int == 1 %} + Tomorrow is Skylar's Birthday. + {% endif %} + {% if states.sensor.birthday_jeff.state | int == 1 %} + Tomorrow is Jeff's Birthday. + {% endif %} + {% if states.sensor.birthday_kat.state | int == 1 %} + Tomorrow is Katherine's Birthday. + {% endif %} + {% if states.sensor.anniversary_our_wedding.state | int == 1 %} + Tomorrow is Jeff and Katherine's Wedding Anniversary. + {% endif %} + {% if states.sensor.anniversary_our_wedding.state | int == 1 %} + Tomorrow is Jeff and Katherine's Wedding Anniversary. + {% endif %} + {% endmacro %} + + {% macro upcoming_holidays() %} + {% if states.sensor.holiday_halloween.state | int == 1 %} + Tomorrow is Halloween. I hope you have picked out a costume. + {{ [ "I'll be going as a dumb home. ", + "I've prepped the scary music. Just in case.", + "I'll be going as HAL 9000. The Pod Bay Doors are being installed today." + ] | random }} + {% elif states.sensor.holiday_halloween.state | int < 30 %} + {{ [ "There are only {{states.sensor.holiday_halloween.state}} days until Halloween.", + "Halloween is only {{states.sensor.holiday_halloween.state}} days away. It might not be enough time. ", + "Halloween is coming. {{states.sensor.holiday_halloween.state}} days and counting.", + "Only {{states.sensor.holiday_halloween.state}} days until Halloween.", + "You have {{states.sensor.holiday_halloween.state}} days until you need a costume." + ] | random }} + {% else %} + {% endif %} + {% if states.sensor.holiday_christmas.state | int == 1 %} + Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies! + {% elif states.sensor.holiday_christmas.state | int < 25 %} + There are only {{states.sensor.holiday_christmas.state}} days until christmas. + {% else %} + {% endif %} + {% endmacro %} + + {% macro skylar_dressed() %} + Skylar, + {% if is_state("sensor.birthday_skylar", "0") %} + Even birthday boys have to get dressed. So get to it. + {% else %} + If you haven't gotten dressed, + {{ [ "It is time to get dressed. ", + "It is time to put some real clothes on. ", + "it is now time to change your underwear.", + ] | random }} + {% endif %} + {% endmacro %} + + {% macro prebed_routine() %} + Skylar, + {{ [ "It is time to get in the bath. ", + "I cannot comminicate with the tub otherwise I would have started the water for you already, but it's still bath time ", + "My sensors are detecting a strange smell. I am running diagnostics, but in the mean time why don't you start a bath.", + ] | random }} + If you go now there may be time for stories. Don't forget to brush your teeth. + {% if is_state("sensor.weekday", "fri") %} + Oh, and tomorrow is Saturday, so why don't we sleep in. + {% endif %} + {% if is_state("sensor.weekday", "sat") %} + Oh, and tomorrow is Sunday, so why don't we sleep in. + {% endif %} + {% endmacro %} + + + {% macro school_today() %} + {% if is_state("calendar.skylar_school", "on") %} + Because you have school today! + {% if states.calendar.skylar_school.attributes.description == "early-release" %} + And guess what? It is early release! + {% endif %} + # {% if is_state("sensor.weekday", "fri") %} + # Plus, it is fun Friday! + # {% endif %} + {% endif %} + {% endmacro %} + + {% macro skylar_events() %} + {% if is_state("calendar.skylar_events", "on") %} + Skylar, You have {{ states.calendar.skylar_events.attributes.message }} today as well! + # {% if is_state("sensor.weekday", "fri") %} + # Plus, it is fun Friday! + # {% endif %} + {% endif %} + {% endmacro %} + + {% macro clothes_suggestion() %} + {% if is_state("sensor.clothing_forecast", "Freezing") %} + It is going to be freezing today so I suggest wearing long pants, and a heavy coat. + {% elif is_state("sensor.clothing_forecast","Cold") %} + It is going to be cold today so I suggest wearing long pants and a light jacket. + {% elif is_state("sensor.clothing_forecast", "Chilly") %} + It is going to be chilly today so I suggest wearing at least long pants. + {% elif is_state("sensor.clothing_forecast", "Nice") %} + It is going to be nice today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Toasty") %} + It is going to be a bit warm today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Hot") %} + It is going to be hot today so I suggest wearing shorts. + {% else %} + {% endif %} + {% endmacro %} + + {% macro chores() %} + {% if is_state("sensor.weekday", "mon") %} + {{ [ "Don't forget tomorrow is Trash Day. ", + "I advise you move the trash cans to the curb for the weekly pickup. ", + " The trash and recycle should go out" + ] | random }} + {% endif %} + {% endmacro %} + + {% macro door_status() %} + {% if is_state("group.external_doors", "on") %} + There are doors are open. + {% else %} + All doors are closed. + {% endif %} + {% endmacro %} + + {% macro jeff_location() %} + {% if is_state("sensor.jeff_location", "home") %} + {{ [ + "I am not sure why you are asking me,", + "You must be having vision problems.", + "I don't want to alarm you, but" + ] | random }} + Jeff is already home! + {% else %} + {% if is_state("sensor.jeff_destination", "na") %} + {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} + Jeff is currenly moving, but + {{ [ + "I am unable to determine his destination.", + "I am having trouble tracking him.", + "His destination is currently unknown." + ] | random }} + At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} + Jeff is currenly moving, but + {{ [ + "I am unable to determine his destination.", + "I am having trouble tracking him.", + "His destination is currently unknown." + ] | random }} + At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {% else %} + {% if is_state("sensor.jeff_location", "Lost") %} + Jeff is lost, but at last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {% else %} + Jeff is currently at {{ states.sensor.jeff_location.state }}. + {% endif %} + {% endif %} + {% elif is_state("sensor.jeff_destination", "home") %} + Jeff is currenly heading home and will be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. + {% else %} + Jeff is heading to {{ states.sensor.jeff_destination.state }}. + {% endif %} + {% endif %} + {% endmacro %} + + {% macro kat_location() %} + {% if is_state("sensor.kat_location", "home") %} + {{ [ + "I am not sure why you are asking me,", + "You must be having vision problems.", + "I don't want to alarm you, but" + ] | random }} + Katherine is already home! + {% else %} + {% if is_state("input_boolean.kat_travel_monitor", "on") %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {% else %} + {% if is_state("sensor.kat_location", "Lost") %} + Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + Katherine is currently at {{ states.sensor.kat_location.state }}. + {% endif %} + {% endif %} + {% else %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Katherine is currenly moving, and + {{ [ + "I am unable to determine her destination.", + "I am having trouble tracking her.", + "Her destination is currently unknown." + ] | random }} + At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Katherine is currenly moving, and + {{ [ + "I am unable to determine her destination.", + "I am having trouble tracking her.", + "Her destination is currently unknown." + ] | random }} + At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + {% if is_state("sensor.kat_location", "Lost") %} + Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + I have located Katherine. She is at {{ states.sensor.kat_location.state }}, and + at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endmacro %} + + {% macro jeff_headed_home() %} + Jeff appears to be headed home. Based on current traffic conditions he should be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. + {% endmacro %} + + {% macro kat_headed_home() %} + Katherine appears to be headed home. Based on current traffic conditions she should be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {% endmacro %} + + {% macro traffic_conditions() %} + {%- if states.sensor.home_to_zoo.state|round > 50 %} + Traffic to the Zoo appears heavy than normnal. + {% else %} + Traffic to the Zoo is normal. + {% endif %} + Currently it will take {{states.sensor.home_to_zoo.state|round}} minutes to get to the Zoo. + + {%- if states.sensor.home_to_summit.state|round > 50 %} + Traffic to the Cox Automotive appears heavy than normnal. + {% else %} + Traffic to the Cox is normal. + {% endif %} + Currently it will take {{states.sensor.home_to_summit.state|round}} minutes to get to Cox Automotive. + {% endmacro %} + + + {% macro iss() %} + {{ [ + "But the International Space Station is passing over. Wave.", + "But The International Space Station just flew by.", + "But if you were to look up right now, and it was dark outside, and you happened to be looking in the right place you would see the International Space Station go by. But it's already passed by now." + ] | random}} + {% endmacro %} + + {% macro security_report() %} + {%- if states.input_boolean.sentry_mode.state == 'on' %} + {{ [ + "Sentry Mode is enabled.", + "Sentry mode is currently active.", + "Barn Door Protocol is currently in effect.", + "My security system is currently armed." + ] | random}} + {% else %} + {{ [ + "Sentry Mode is disabled.", + "Sentry mode is currently active.", + "My security system is currently disarmed." + ] | random}} + {% endif %} + {%- if states.group.external_doors.state == 'off' %} + All external doors are secured. + {% else %} + The following doors are open, + {%- if states.binary_sensor.front_door.state == 'on' %} + Front Door. + {% endif %} + {%- if states.binary_sensor.back_door.state == 'on' %} + Back Door. + {% endif %} + {%- if states.binary_sensor.laundry_room_door.state == 'on' %} + Laundry Room Door. + {% endif %} + {%- if states.binary_sensor.garage_door.state == 'on' %} + Garage Door. + {% endif %} + {%- if states.binary_sensor.side_door.state == 'on' %} + Side Door. + {% endif %} + {% endif %} + {% endmacro %} + + {%- macro washer_needs_emptying() -%} + {{ [ + "Just a reminder. Washing machine needs to be emptied.", + "I'm sure you have more inportant things to do, but the washing machine needs to be emptied.", + "Looks like the washing machine has completed it's cycle.", + "Don't forget to move the clothes to the dryer." + ] | random }} + {%- endmacro -%} + + {# ********************************************* #} + {# ******** Start the Speech routines ******** #} + {# ********************************************* #} + + {% if call_greeting == 1 %} + {{ greeting() }} + {% endif %} + + {% if call_confirmation == 1 %} + {{ confirmation() }} + {% endif %} + + {% if call_interuption == 1 %} + {{ interuption() }} + {% endif %} + + {% if call_issue == 1 %} + {{ issue() }} + {% endif %} + + {% if call_morning_greeting == 1 %} + {{ morning_greeting() }} + {% endif %} + + {% if call_evening_greeting == 1 %} + {{ evening_greeting() }} + {% endif %} + + {% if states.sensor.nws_alerts.state | int > 0 and call_weather_alerts == 1 %} + {{ weather_alerts() }} + {% endif %} + + {% if call_todays_events == 1 %} + {{ todays_events() }} + {% endif %} + + {% if call_current_conditions_outside == 1 %} + {{ current_conditions_outside() }} + {% endif %} + + {% if call_current_conditions_inside == 1 %} + {{ current_conditions_inside() }} + {% endif %} + + {% if call_current_conditions_garage == 1 %} + {{ current_conditions_garage() }} + {% endif %} + + {% if call_daily_forecast == 1 %} + {{ daily_forecast() }} + {% endif %} + + {% if call_overnight_forecast == 1 %} + {{ overnight_forecast() }} + {% endif %} + + {% if call_future_forecast == 1 %} + {{ future_forecast() }} + {% endif %} + + {% if call_upcoming_birthdays == 1 %} + {{ upcoming_birthdays() }} + {% endif %} + + {% if call_upcoming_holidays == 1 %} + {{ upcoming_holidays() }} + {% endif %} + + {% if call_skylar_dressed == 1 %} + {{ skylar_dressed() }} + {% endif %} + + {% if call_prebed_routine == 1 %} + {{ prebed_routine() }} + {% endif %} + + {% if call_school_today == 1 %} + {{ school_today() }} + {% endif %} + + {% if call_skylar_events == 1 %} + {{ skylar_events() }} + {% endif %} + + {% if call_clothes_suggestion == 1 %} + {{ clothes_suggestion() }} + {% endif %} + + {% if call_chores == 1 %} + {{ chores() }} + {% endif %} + + {% if call_door_status == 1 %} + {{ door_status() }} + {% endif %} + + {% if call_jeff_location == 1 %} + {{ jeff_location() }} + {% endif %} + + {% if call_kat_location == 1 %} + {{ kat_location() }} + {% endif %} + + {% if call_jeff_headed_home == 1 %} + {{ jeff_headed_home() }} + {% endif %} + + {% if call_kat_headed_home == 1 %} + {{ kat_headed_home() }} + {% endif %} + + {% if call_traffic_conditions == 1 %} + {{ traffic_conditions() }} + {% endif %} + + {{ usps }} + + {% if call_iss == 1 %} + {{ iss() }} + {% endif %} + + {% if call_security_report == 1 %} + {{ security_report() }} + {% endif %} + + {% if call_washer_needs_emptying == 1 %} + {{ washer_needs_emptying() }} + {% endif %} + + {{ welcome_home }} + + {{ speech_message }} + ############################################################################### # Twitter @@ -286,98 +891,85 @@ script: ############################################################################### # Morning Report ############################################################################### - morning_report: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/morning_report.yaml + # morning_report: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/morning_report.yaml ############################################################################### # Skylar Get Dressed ############################################################################### - skylar_morning_greeting: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/skylar_morning.yaml + # skylar_morning_greeting: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/skylar_morning.yaml ############################################################################### # Nightly Report ############################################################################### - nightly_report: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/nightly_report.yaml + # nightly_report: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/nightly_report.yaml - test_nightly_report: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/nightly_report.yaml + # test_nightly_report: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/nightly_report.yaml ############################################################################### # Weather Report ############################################################################### weather_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/weather_report.yaml - - delay: - minutes: 5 - - service: script.turn_off - entity_id: script.weather_report + - service: script.ah_report + data: + call_weather_alerts: 1 + call_current_conditions_outisde: 1 + call_current_conditions_inside: 1 + call_current_conditions_garage: 1 + call_daily_forecast: 1 + call_overnight_forecast: 1 + call_future_forecast: 1 + ############################################################################### # Traffic Report ############################################################################### traffic_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/traffic_report.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.traffic_report + - service: script.ah_report + data: + call_traffic_conditions: 1 ############################################################################### # Security Report ############################################################################### security_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/security_report.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.security_report + - service: script.ah_report + data: + call_security_report: 1 ############################################################################### # Jeff Traffic Reports ############################################################################### jeff_eta_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jeff_eta.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.jeff_eta_report + - service: script.ah_report + data: + call_jeff_location: 1 jeff_headed_home_annc: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jeff_heading_home.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.jeff_headed_home_annc + - service: script.ah_report + data: + call_jeff_headed_home: 1 ############################################################################### @@ -385,30 +977,22 @@ script: ############################################################################### kat_eta_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_eta.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.kat_eta_report + - service: script.ah_report + data: + call_kat_location: 1 kat_headed_home_annc: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_heading_home.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.kat_headed_home_annc + - service: script.ah_report + data: + call_kat_headed_home: 1 ############################################################################### # Prebed Routing ############################################################################### - prebed_routine: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/skylar_night.yaml - # message: > - # Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. + # prebed_routine: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/skylar_night.yaml + # # message: > + # # Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. diff --git a/packages/presence.yaml b/packages/presence.yaml index 4f90e13..5e0f9fc 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -144,9 +144,11 @@ automation: action: - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_arrived_at_work.yaml + - service: script.ah_report + data: + speech_message: 'Kat has arrived at worked.' + call_interuption: 1 + - id: kat_leaves_zoo alias: Kat Leaves Zoo Notification initial_state: true @@ -159,6 +161,11 @@ automation: action: - service: input_boolean.turn_on entity_id: input_boolean.kat_travel_monitor + - service: script.ah_report + data: + call_interuption: 1 + call_kat_headed_home: 1 + - id: '1550109528753' alias: Jeff Is Heading Home initial_state: true @@ -168,6 +175,10 @@ automation: condition: [] action: - service: script.jeff_destination_home + - service: script.ah_report + data: + call_interurption: 1 + call_jeff_headed_home: 1 - id: family_has_arrived alias: Family Has arrived @@ -206,6 +217,7 @@ automation: - service: script.standby - service: script.washer_finished_notification_audible initial_state: true + - id: family_has_left alias: Family Has Left initial_state: true @@ -226,6 +238,7 @@ automation: - service: script.lockdown - service: script.lockdown_issue - service: script.all_fans_off + - id: jeff_is_home alias: Jeff is Home initial_state: true @@ -234,10 +247,6 @@ automation: event: enter platform: zone zone: zone.home - # - entity_id: person.jeffrey - # event: enter - # platform: zone - # zone: zone.home action: - service: script.family_is_home - service: script.jeff_is_home @@ -245,6 +254,7 @@ automation: - service: script.driveway_on - entity_id: input_boolean.jeff_travel_monitor service: input_boolean.turn_off + - id: jeff_arrives_summit alias: Jeff Arrives At Summit trigger: @@ -262,6 +272,7 @@ automation: who: "kat" message: "Jeff has arrived at Summit" initial_state: true + - id: jeff_arrives_summit_notification alias: Notify Kat Jeff At Summit trigger: @@ -276,6 +287,7 @@ automation: action: - service: script.jeff_destination_na initial_state: true + - id: jeff_leaves_summit alias: Jeff Leaves Summit initial_state: true @@ -287,6 +299,7 @@ automation: action: - service: input_boolean.turn_off entity_id: input_boolean.jeff_traffic_alert_home + - id: kat_is_home alias: Kat is Home initial_state: true @@ -304,37 +317,30 @@ automation: - service: script.driveway_on - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor - - - id: annc_arrival_jeff - alias: 'Announce Jeff Arrived' + + - id: welcome_home + alias: Welcome Home trigger: - platform: state entity_id: - - device_tracker.jeffreystonesiphone + - person.jeffrey + - person.katherine from: 'not_home' to: 'home' - condition: - - condition: state - entity_id: sensor.family_status - state: Home action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: !include ../templates/jeff_home_annc.yaml - - - id: annc_arrival_kat - alias: 'Announce Kat Arrived' - trigger: - - platform: state - entity_id: - - device_tracker.katherinestonesiphone - from: 'not_home' - to: 'home' - condition: - - condition: state - entity_id: sensor.family_status - state: Home - action: - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_home_annc.yaml \ No newline at end of file + welcome_home: > + {% set person = trigger.to_state.attributes.friendly_name %} + {%- macro greeting_sentence(person) -%} + {{ [ + person + " has arrived.", + person + " is in the neighborhood.", + person + " is arriving.", + "My sensors are picking up the presence of additional humans. " ~ person +" has been identified as home.", + person + " has finally made it home." + ] | random }} + {%- endmacro -%} + {{greeting_sentence(person)}} + call_interuption: 1 + diff --git a/packages/space.yaml b/packages/space.yaml index 1a3ed60..e19ed7b 100755 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -82,11 +82,11 @@ automation: to: 'on' from: 'off' action: - - service: script.jarvis_voice - data_template: - message: !include ../templates/iss_report.yaml + - service: script.ah_report + data: + call_interuption: 1 + call_iss: 1 - - id: full_moon_tweet initial_state: true alias: 'Full Moon -Tweet' diff --git a/packages/usps.yaml b/packages/usps.yaml index 963b1b8..ce4c733 100755 --- a/packages/usps.yaml +++ b/packages/usps.yaml @@ -64,19 +64,15 @@ automation: - condition: template value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}' action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: !include ../templates/jarvis_interuptions.yaml - - delay: - seconds: 2 - - service: script.jarvis_notify - data_template: - message: > + usps: >- {%- if states.sensor.usps_mail.state | int == 1 -%} USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today. {%- else -%} USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today. {%- endif -%} + call_interuption: 1 - service: script.text_notify data_template: who: "jeff" @@ -104,16 +100,12 @@ automation: - condition: template value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}' action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: !include ../templates/jarvis_interuptions.yaml - - delay: - seconds: 2 - - service: script.jarvis_notify - data_template: - message: > + usps: > {%- if states.sensor.usps_packages.state | int == 1 -%} USPS is delivering {{ states.sensor.usps_packages.state }} package today. {%- else -%} USPS is delivering {{ states.sensor.usps_packages.state }} packages today. {%- endif -%} + call_interuption: 1 diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index f4e44c9..5f082ef 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -217,18 +217,6 @@ automation: - service: media_player.media_stop entity_id: media_player.hass_speaker - - id: play_weather_report - alias: Play Weather Report - initial_state: true - trigger: - - entity_id: input_boolean.play_weather_report - from: 'Off' - platform: state - to: 'On' - action: - - service: script.turn_on - entity_id: script.weather_report - - service: script.voice_reports_off script: nws_popup_on_wx_alert: diff --git a/scripts.yaml b/scripts.yaml index 5374016..7706e0c 100755 --- a/scripts.yaml +++ b/scripts.yaml @@ -8,18 +8,10 @@ washer_finished_notification_audible: - condition: state entity_id: sensor.washer_status state: complete - - service: script.jarvis_voice - data_template: - message: > - {%- macro washing_annc() -%} - {{ [ - "Just a reminder. Washing machine needs to be emptied.", - "I'm sure you have more inportant things to do, but the washing machine needs to be emptied.", - "Looks like the washing machine has completed it's cycle.", - "Don't forget to move the clothes to the dryer." - ] | random }} - {%- endmacro -%} - {{washing_annc()}} + - service: script.ah_report + data: + call_interuption: 1 + call_washer_needs_emptying: 1 girl_eyes_on_you: sequence: - service: media_player.play_media @@ -298,19 +290,10 @@ appliances_off: - data: entity_id: switch.artemis service: switch.turn_off -voice_reports_off: - sequence: - - delay: - minutes: 5 - - service: input_boolean.turn_off - entity_id: input_boolean.play_weather_report - - service: script.turn_off - entity_id: script.weather_report -jeff_text_test: +jeff_speech_test: sequence: - - service: script.text_notify - data_template: - who: "jeff" - title: "Test Text" - message: "This is just a test." \ No newline at end of file + - service: script.ah_report + data: + call_kat_location: 1 + diff --git a/templates/halloween_countdown.yaml b/templates/halloween_countdown.yaml deleted file mode 100755 index 677abbc..0000000 --- a/templates/halloween_countdown.yaml +++ /dev/null @@ -1,27 +0,0 @@ - > - {# Halloween Countdown #} - {%- macro getCountDown() -%} - "Halloween is only {{ states.sensor.holiday_halloween.state }} days away! " - {{- [ - " Have you picked a costume? I'm going as Disney's Haunted Mansion.", - " I'm going as a dumb home. Get it? " - ] | random -}} - {%- endmacro -%} - {%- macro getTags() -%} - #homeassistant #iot #smarthome - {%- endmacro -%} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getCountDown() }} - {{ getTags() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/iss_report.yaml b/templates/iss_report.yaml deleted file mode 100755 index a988a20..0000000 --- a/templates/iss_report.yaml +++ /dev/null @@ -1,30 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {{ [ - "But the International Space Station is passing over. Wave.", - "But The International Space Station just flew by.", - "But if you were to look up right now, and it was dark outside, and you happened to be looking in the right place you would see the International Space Station go by. But it's already passed by now." - ] | random}} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/jarvis_confirmations.yaml b/templates/jarvis_confirmations.yaml deleted file mode 100755 index f79933e..0000000 --- a/templates/jarvis_confirmations.yaml +++ /dev/null @@ -1,29 +0,0 @@ - > - {% macro getConfirmation() %} - {{ [ - "Okay.", - "If you insist.", - "I am afraid I can't do that Dave,,,I am kidding,", - "Leave it to me.", - "As you wish.", - "By your command.", - "Affirmative.", - "No Problem.", - "I think I can handle that.", - "Working on it now." - ] | random }} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getConfirmation() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jarvis_interuptions.yaml b/templates/jarvis_interuptions.yaml deleted file mode 100755 index 57a448b..0000000 --- a/templates/jarvis_interuptions.yaml +++ /dev/null @@ -1,25 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jarvis_issue.yaml b/templates/jarvis_issue.yaml deleted file mode 100755 index 838d728..0000000 --- a/templates/jarvis_issue.yaml +++ /dev/null @@ -1,23 +0,0 @@ - > - {% macro getIssue() %} - {{ [ - "I have detected an issue!", - "We have a problem!", - "You might not like this.", - "There is something that needs your attention." - ] | random }} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIssue() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_eta.yaml b/templates/jeff_eta.yaml deleted file mode 100755 index 4f21c4b..0000000 --- a/templates/jeff_eta.yaml +++ /dev/null @@ -1,55 +0,0 @@ - > - {% macro getIntro() %} - {% if is_state("sensor.jeff_location", "home") %} - {{ [ - "I am not sure why you are asking me,", - "You must be having vision problems.", - "I don't want to alarm you, but" - ] | random }} - Jeff is already home! - {% else %} - {% if is_state("sensor.jeff_destination", "na") %} - {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} - Jeff is currenly moving, but - {{ [ - "I am unable to determine his destination.", - "I am having trouble tracking him.", - "His destination is currently unknown." - ] | random }} - At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. - {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} - Jeff is currenly moving, but - {{ [ - "I am unable to determine his destination.", - "I am having trouble tracking him.", - "His destination is currently unknown." - ] | random }} - At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. - {% else %} - {% if is_state("sensor.jeff_location", "Lost") %} - Jeff is lost, but at last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. - {% else %} - Jeff is currently at {{ states.sensor.jeff_location.state }}. - {% endif %} - {% endif %} - {% elif is_state("sensor.jeff_destination", "home") %} - Jeff is currenly heading home and will be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. - {% else %} - Jeff is heading to {{ states.sensor.jeff_destination.state }}. - {% endif %} - {% endif %} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_heading_home.yaml b/templates/jeff_heading_home.yaml deleted file mode 100755 index 7880797..0000000 --- a/templates/jeff_heading_home.yaml +++ /dev/null @@ -1,24 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - Jeff appears to be headed home. Based on current traffic conditions he should be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_home_annc.yaml b/templates/jeff_home_annc.yaml deleted file mode 100755 index a18a187..0000000 --- a/templates/jeff_home_annc.yaml +++ /dev/null @@ -1,33 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {% endmacro %} - {% macro getMessage() %} - {{ [ - "Jeff has arrived.", - "Jeff is in the neighborhood.", - "Jeff is arriving.", - "Jeff has finally made it home." - ] | random }} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - {{ getMessage() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_arrived_at_work.yaml b/templates/kat_arrived_at_work.yaml deleted file mode 100755 index 81f6ae8..0000000 --- a/templates/kat_arrived_at_work.yaml +++ /dev/null @@ -1,26 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - Katherine has arrived at work. - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_eta.yaml b/templates/kat_eta.yaml deleted file mode 100755 index 97f4a09..0000000 --- a/templates/kat_eta.yaml +++ /dev/null @@ -1,64 +0,0 @@ - > - {% macro getIntro() %} - {% if is_state("sensor.kat_location", "home") %} - {{ [ - "I am not sure why you are asking me,", - "You must be having vision problems.", - "I don't want to alarm you, but" - ] | random }} - Katherine is already home! - {% else %} - {% if is_state("input_boolean.kat_travel_monitor", "on") %} - {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} - Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. - {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} - Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. - {% else %} - {% if is_state("sensor.kat_location", "Lost") %} - Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% else %} - Katherine is currently at {{ states.sensor.kat_location.state }}. - {% endif %} - {% endif %} - {% else %} - {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} - Katherine is currenly moving, and - {{ [ - "I am unable to determine her destination.", - "I am having trouble tracking her.", - "Her destination is currently unknown." - ] | random }} - At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} - Katherine is currenly moving, and - {{ [ - "I am unable to determine her destination.", - "I am having trouble tracking her.", - "Her destination is currently unknown." - ] | random }} - At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% else %} - {% if is_state("sensor.kat_location", "Lost") %} - Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% else %} - I have located Katherine. She is at {{ states.sensor.kat_location.state }}, and - at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% endif %} - {% endif %} - {% endif %} - {% endif %} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_heading_home.yaml b/templates/kat_heading_home.yaml deleted file mode 100755 index 3b4f6a8..0000000 --- a/templates/kat_heading_home.yaml +++ /dev/null @@ -1,24 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - Katherine appears to be headed home. Based on current traffic conditions she should be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_home_annc.yaml b/templates/kat_home_annc.yaml deleted file mode 100755 index 3588427..0000000 --- a/templates/kat_home_annc.yaml +++ /dev/null @@ -1,33 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {% endmacro %} - {% macro getMessage() %} - {{ [ - "Katherine has arrived.", - "Katherine is in the neighborhood.", - "Katherine is arriving.", - "Katherine has finally made it home." - ] | random }} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - {{ getMessage() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/morning_report.yaml b/templates/morning_report.yaml deleted file mode 100755 index dda68f7..0000000 --- a/templates/morning_report.yaml +++ /dev/null @@ -1,95 +0,0 @@ - > - {% macro getGreeting() %} - {{ [ "Good morning Anchorage House. Rise and Shine. ", - "Good morning everyone. ", - "Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", - "Good morning. The early bird gets the worm.", - "Good morning from the bridge.", - "Pardom the interuption.", - "I hope I am not interupting, but I think this would be a good time for the morning report." - ] | random }} - {% if is_state("input_boolean.guest_mode", "on") %} - {{ [ "And a special welcome to our guests. ", - "And good morning to our guests as well. ", - "Hey look at that, someone came to visit Anchorage House. Hope you slept well." - ] | random }} - {% endif %} - {% endmacro %} - {% macro getTodaysEvent() %} - {% if is_state("sensor.holiday_halloween","0") %} - This is Halloween, this is halloween. Happy Halloween! - {% endif %} - {% if is_state("sensor.holiday_christmas","0") %} - Merry Christmas Everyone! - {% endif %} - {% if is_state("sensor.anniversary_our_wedding","0") %} - Happy Anniversary! It has been an amazing {{ states.sensor.anniversary_our_wedding.attributes.years }} years! - {% endif %} - {% if is_state("calendar.holidays_in_united_states", "on") %} - Today is {{states.calendar.holidays_in_united_states.attributes.message}}. - {% endif %} - {% endmacro %} - {% macro getCurrentConditions() %} - It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. - The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees and - The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees. The Climate is set to {{states.climate.home.state}}. - {% endmacro %} - {% macro getForecast() %} - The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. - {% endmacro %} - - {% macro getBirthdays() %} - {% if states.calendar.birthdays.state == "on" %} - Today is {{ states.calendar.birthdays.attributes.message }} birthday! - {% else %} - {% if states.sensor.birthday_skylar.state | int == 1 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_jeff.state | int == 1 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int == 1 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endif %} - {% endmacro %} - {% macro getAnniversary() %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int == 1 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {% endif %} - {% if states.sensor.holiday_christmas.state | int == 1 %} - Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies! - {% elif states.sensor.holiday_christmas.state | int < 25 %} - There are only {{states.sensor.holiday_christmas.state}} days until christmas. - {% else %} - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getGreeting() }} - {{ getTodaysEvent() }} - {{ getCurrentConditions() }} - {{ getForecast() }} - {{ getBirthdays() }} - {{ getAnniversary() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/nightly_report.yaml b/templates/nightly_report.yaml deleted file mode 100755 index ddeec9e..0000000 --- a/templates/nightly_report.yaml +++ /dev/null @@ -1,72 +0,0 @@ - > - {% macro getSnark() %} - {{ [ "Good evening, ", - "Pardon the interuption, ", - "Good Evening Anchorage House, " - ] | random }} - {{ [ "I thought you might like to know. ", - "Here is the nightly report.", - "Before I call it a day I wanted to let you know," - ] | random }} - {% endmacro %} - {% macro getForecast() %} - The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0d.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. - {% endmacro %} - {% macro getTrashDay() %} - {% if is_state("sensor.weekday", "mon") %} - {{ [ "Don't forget tomorrow is Trash Day. ", - "I advise you move the trash cans to the curb for the weekly pickup. ", - " The trash and recycle should go out" - ] | random }} - {% endif %} - {% endmacro %} - {% macro getBirthdays() %} - {% if states.sensor.birthday_skylar.state | int == 1 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_skylar.state | int > 1 %} - {% if states.sensor.birthday_skylar.state | int < 5 %} - Skylar's birthday is in {{states.sensor.birthday_skylar.state}} days! - {% endif %} - {% endif %} - {% if states.sensor.birthday_jeff.state | int == 1 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int == 1 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int == 1 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {{ [ "I'll be going as a dumb home. ", - "I've prepped the scary music. Just in case.", - "I'll be going as HAL 9000." - ] | random }} - {% endif %} - {% if states.sensor.holiday_christmas.state | int == 1 %} - Tomorrow is Christmas. It's practically here! - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getSnark() }} - {{ getForecast() }} - {{ getTrashDay() }} - {{ getBirthdays() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/prebed_routing.yaml b/templates/prebed_routing.yaml deleted file mode 100755 index aa24037..0000000 --- a/templates/prebed_routing.yaml +++ /dev/null @@ -1,50 +0,0 @@ - > - {% macro getForecast() %} - The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain. - {% endmacro %} - {% macro getTrashDay() %} - {% if is_state("sensor.weekday", "mon") %} - Tomorrow is trash day! - {% endif %} - {% endmacro %} - {% macro getBirthdays() %} - {% if states.sensor.birthday_skylar.state | int < 2 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_jeff.state | int < 2 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int < 2 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int < 2 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int < 2 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {% endif %} - {% if states.sensor.holiday_christmas.state | int < 2 %} - Tomorrow is Christmas. It's practically here! - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. - {{ getForecast() }} - {{ getTrashDay() }} - {{ getBirthdays() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/security_report.yaml b/templates/security_report.yaml deleted file mode 100755 index 50e069b..0000000 --- a/templates/security_report.yaml +++ /dev/null @@ -1,22 +0,0 @@ - > - {% macro getIntro() %} - {% if is_state("group.external_doors", "on") %} - There are doors are open. - {% else %} - All doors are closed. - {% endif %} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/skylar_morning.yaml b/templates/skylar_morning.yaml deleted file mode 100755 index ea07d1c..0000000 --- a/templates/skylar_morning.yaml +++ /dev/null @@ -1,75 +0,0 @@ - > - {% macro getIntro() %} - - {{ [ "Pardom me, Skylar,, ", - "Good morning Skylar, This is your digital assistant, Jarvis ", - "This is your cruise director with your morning announcements.", - ] | random }} - {% endmacro %} - {% macro getDressed() %} - {% if is_state("sensor.birthday_skylar", "0") %} - First, Happy Birthday Skylar! Second, even birthday boys have to get dressed. So get to it. - {% else %} - If you haven't gotten dressed, - {{ [ "It is time to get dressed. ", - "It is time to put some real clothes on. ", - "it is now time to change your underwear.", - ] | random }} - {% endif %} - {% endmacro %} - {% macro getSchoolDay() %} - {% if is_state("calendar.skylar_school", "on") %} - Because you have school today! - {% if states.calendar.skylar_school.attributes.description == "early-release" %} - And guess what? It is early release! - {% endif %} - # {% if is_state("sensor.weekday", "fri") %} - # Plus, it is fun Friday! - # {% endif %} - {% endif %} - {% endmacro %} - {% macro getEvents() %} - {% if is_state("calendar.skylar_events", "on") %} - You have {{ states.calendar.skylar_events.attributes.message }} today! - # {% if is_state("sensor.weekday", "fri") %} - # Plus, it is fun Friday! - # {% endif %} - {% endif %} - {% endmacro %} - {% macro getClothesSuggestion() %} - {% if is_state("sensor.clothing_forecast", "Freezing") %} - It is going to be freezing today so I suggest wearing long pants, and a heavy coat. - {% elif is_state("sensor.clothing_forecast","Cold") %} - It is going to be cold today so I suggest wearing long pants and a light jacket. - {% elif is_state("sensor.clothing_forecast", "Chilly") %} - It is going to be chilly today so I suggest wearing at least long pants. - {% elif is_state("sensor.clothing_forecast", "Nice") %} - It is going to be nice today so I suggest wearing shorts. - {% elif is_state("sensor.clothing_forecast", "Toasty") %} - It is going to be a bit warm today so I suggest wearing shorts. - {% elif is_state("sensor.clothing_forecast", "Hot") %} - It is going to be hot today so I suggest wearing shorts. - {% else %} - {% endif %} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - {{ getDressed() }} - {{ getSchoolDay() }} - {{ getEvents() }} - {{ getClothesSuggestion() }} - - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/skylar_night.yaml b/templates/skylar_night.yaml deleted file mode 100755 index 7ca35ed..0000000 --- a/templates/skylar_night.yaml +++ /dev/null @@ -1,38 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but," - ] | random }} - Skylar. Bedtime is in thirty minutes. - {% endmacro %} - {% macro getPrebedRoutine() %} - If you are taking a bath now is the time to get in the tub, so you have time to brush teeth and read stories. - Otherwise it is time to put on your pajamas. - {% endmacro %} - {% macro getReminders() %} - Don't forget to feed your fish. - {% if is_state("sensor.weekday", "fri") %} - Oh, and tomorrow is the weekend, so why don't we sleep in. - {% endif %} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. - {{ getIntro() }} - {{ getPrebedRoutine() }} - {{ getReminders() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/traffic_report.yaml b/templates/traffic_report.yaml deleted file mode 100755 index 65abd50..0000000 --- a/templates/traffic_report.yaml +++ /dev/null @@ -1,34 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "You might not like what I have to say.", - "Are you sure you want to know?", - "I can tell you but you are probably not going to like it.", - "Here you go." - ] | random }} - Under current traffic conditions - {% endmacro %} - {% macro getTrafficZoo() %} - Zoo Atlanta is {{states.sensor.home_to_zoo.state|round}} minutes away - {% endmacro %} - {% macro getTrafficCox() %} - And Cox Automotive is {{states.sensor.home_to_summit.state|round}} minutes away by car. - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getTrafficZoo() }} - {{ getTrafficCox() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} - - diff --git a/templates/weather_report.yaml b/templates/weather_report.yaml deleted file mode 100755 index d3c53e8..0000000 --- a/templates/weather_report.yaml +++ /dev/null @@ -1,31 +0,0 @@ - > - {% macro getCurrent() %} - It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. - The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_back_porch_humidity.state|round}} percent. - The garage is {{states.sensor.accurite_garage_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_garage_humidity.state|round}} percent. - The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees and the Climate is set to {{states.climate.home.state}}. - {% endmacro %} - {% macro getTodayForecast() %} - The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. - {% endmacro %} - {% macro getForecast() %} - Looking into the future you can expect {{states.sensor.dark_sky_daily_summary.state}}. - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getCurrent() }} - {{ getTodayForecast() }} - {{ getForecast() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} - - diff --git a/templates/welcome_home.yaml b/templates/welcome_home.yaml deleted file mode 100755 index d8d3f77..0000000 --- a/templates/welcome_home.yaml +++ /dev/null @@ -1,18 +0,0 @@ - > - {% macro getIntro() %} - - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file From 61349fd6839223ff06d32bc4b5c8304772267234 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sun, 14 Jul 2019 17:02:31 -0400 Subject: [PATCH 048/106] Combined speech notifications into single script thanks to @CCOSTAN --- packages/announcements.yaml | 35 +- packages/notify.yaml | 736 +++++++++++++++++++++++++--- packages/presence.yaml | 74 +-- packages/space.yaml | 8 +- packages/usps.yaml | 20 +- packages/weather_alerts_nws.yaml | 12 - scripts.yaml | 35 +- templates/halloween_countdown.yaml | 27 - templates/iss_report.yaml | 30 -- templates/jarvis_confirmations.yaml | 29 -- templates/jarvis_interuptions.yaml | 25 - templates/jarvis_issue.yaml | 23 - templates/jeff_eta.yaml | 55 --- templates/jeff_heading_home.yaml | 24 - templates/jeff_home_annc.yaml | 33 -- templates/kat_arrived_at_work.yaml | 26 - templates/kat_eta.yaml | 64 --- templates/kat_heading_home.yaml | 24 - templates/kat_home_annc.yaml | 33 -- templates/morning_report.yaml | 95 ---- templates/nightly_report.yaml | 72 --- templates/prebed_routing.yaml | 50 -- templates/security_report.yaml | 22 - templates/skylar_morning.yaml | 75 --- templates/skylar_night.yaml | 38 -- templates/traffic_report.yaml | 34 -- templates/weather_report.yaml | 31 -- templates/welcome_home.yaml | 18 - 28 files changed, 750 insertions(+), 998 deletions(-) delete mode 100755 templates/halloween_countdown.yaml delete mode 100755 templates/iss_report.yaml delete mode 100755 templates/jarvis_confirmations.yaml delete mode 100755 templates/jarvis_interuptions.yaml delete mode 100755 templates/jarvis_issue.yaml delete mode 100755 templates/jeff_eta.yaml delete mode 100755 templates/jeff_heading_home.yaml delete mode 100755 templates/jeff_home_annc.yaml delete mode 100755 templates/kat_arrived_at_work.yaml delete mode 100755 templates/kat_eta.yaml delete mode 100755 templates/kat_heading_home.yaml delete mode 100755 templates/kat_home_annc.yaml delete mode 100755 templates/morning_report.yaml delete mode 100755 templates/nightly_report.yaml delete mode 100755 templates/prebed_routing.yaml delete mode 100755 templates/security_report.yaml delete mode 100755 templates/skylar_morning.yaml delete mode 100755 templates/skylar_night.yaml delete mode 100755 templates/traffic_report.yaml delete mode 100755 templates/weather_report.yaml delete mode 100755 templates/welcome_home.yaml diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 4c4a6c3..1205841 100755 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -56,7 +56,11 @@ automation: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - - service: script.prebed_routine + - service: script.ah_report + data: + call_interuption: 1 + call_prebed_routine: 1 + - id: nightly_report initial_state: true alias: Nightly Report @@ -64,7 +68,14 @@ automation: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - - service: script.nightly_report + - service: script.ah_report + data: + call_greeting: 1 + call_evening_greeting: 1 + call_weather_alerts: 1 + call_overnight_forecast: 1 + call_upcoming_holidays: 1 + call_chores: 1 - id: good_morning_report alias: Good Morning Report @@ -73,11 +84,21 @@ automation: platform: template value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" action: - - service: script.morning_report + - service: script.ah_report + data: + call_greeting: 1 + call_morning_greeting: 1 + call_weather_alerts: 1 + call_todays_events: 1 + call_current_conditions_outisde: 1 + call_current_conditions_inside: 1 + call_daily_forecast: 1 + call_upcoming_birthdays: 1 - service: script.twitter_notify data: message: 'I just provided a morning briefing including weather, and traffic conditions to the residents of Anchorage House. ' + - id: skylar_morning_greeting alias: Skylar Morning Greeting initial_state: true @@ -93,6 +114,12 @@ automation: - thu - fri action: - - service: script.skylar_morning_greeting + - service: script.ah_report + data: + call_interuption: 1 + call_skylar_dressed: 1 + call_school_today: 1 + call_skylar_events: 1 + call_clothes_suggestion: 1 diff --git a/packages/notify.yaml b/packages/notify.yaml index 1ea8173..8c91b6b 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -216,6 +216,11 @@ script: jarvis_voice: sequence: + - service: mqtt.publish + data_template: + topic: 'house/polly/lastmsg' + payload: "This message is from {{ now().strftime('%-I') }}:{{ now().strftime('%M') }} {{ now().strftime('%p') }}. {{ message | truncate(220)}}" + retain: true - condition: template value_template: '{{ states.binary_sensor.quiet_time.state == "off" }}' - condition: state @@ -239,6 +244,606 @@ script: {{ message }} cache: true + + # speech_jarvis: + # sequence: + # - condition: state + # entity_id: binary_sensor.quiet_time + # state: 'off' + + # - service: tts.amazon_polly_say + # data_template: + # entity_id: > + # {% if states.input_boolean.audible_notifications.state == 'on' %} + # media_player.hass_speaker + # {% else %} + # media_player.googlehome0715, media_player.googlehomehub3492 + # {% endif %} + # message: >- + # + # {{ message }} + # + # cache: true + + ah_report: + sequence: + - condition: or + conditions: + - condition: state + entity_id: sensor.family_status + state: 'Home' + - condition: state + entity_id: input_boolean.guest_mode + state: 'on' + + - service: script.jarvis_voice + data_template: + message: >- + + {% macro greeting() %} + {% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %} + Good morning, + {% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %} + Good afternoon, + {% else %} + Good evening, + {% endif %} + {% endmacro %} + + {% macro confirmation() %} + {{ [ + "Okay.", + "If you insist.", + "I am afraid I can't do that Dave,,,I am kidding,", + "Leave it to me.", + "As you wish.", + "By your command.", + "Affirmative.", + "No Problem.", + "I think I can handle that.", + "Working on it now.", + "Funny, I was just about to do that. " + ] | random }} + {% endmacro %} + + {% macro interuption() %} + {{ [ + "Pardon me,", + "Excuse me,", + "I do not mean to interupt, but.", + "I thought you might like to know." + ] | random }} + {% endmacro %} + + {% macro issue() %} + {{ [ + "I have detected an issue!", + "We have a problem!", + "You might not like this.", + "There is something that needs your attention." + ] | random }} + {% endmacro %} + + {% macro morning_greeting() %} + {{ [ "Anchorage House. Rise and Shine. ", + "everyone. ", + "The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", + "The early bird gets the worm.", + "from the bridge.", + "Pardom the interuption.", + "I hope I am not interupting, but I wanted to give you an update." + ] | random }} + {% if is_state("input_boolean.guest_mode", "on") %} + {{ [ "And a special welcome to our guests. ", + "And good morning to our guests as well. ", + "Hey look at that, someone came to visit Anchorage House. Hope everyone slept well." + ] | random }} + {% endif %} + {% endmacro %} + + {% macro evening_greeting() %} + {{ [ "I thought you might like to know. ", + "Here is the nightly report.", + "Before I call it a day I wanted to let you know,", + "Anchorage House." + ] | random }} + {% endmacro %} + + {% macro weather_alerts() %} + There are currently {{states.sensor.nws_alerts.state }} active weather alerts for our area. + The National Weather Service Has issued, + {% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[3] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[2] }}. + {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] is defined %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[1] }}. + {% else %} + a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[0] }}. + {% endif %} + {% endmacro %} + + {% macro todays_events() %} + {% if is_state("sensor.holiday_halloween","0") %} + This is Halloween, this is halloween. Happy Halloween! + {% endif %} + {% if is_state("sensor.holiday_christmas","0") %} + Merry Christmas Everyone! + {% endif %} + {% if is_state("sensor.anniversary_our_wedding","0") %} + Happy Anniversary! It has been an amazing {{ states.sensor.anniversary_our_wedding.attributes.years }} years! + {% endif %} + {% if is_state("calendar.holidays_in_united_states", "on") %} + Today is {{states.calendar.holidays_in_united_states.attributes.message}}. + {% endif %} + {% if is_state("calendar.anchorage_holidays", "on") %} + And dont forget Today is also {{states.calendar.anchorage_holidays.attributes.message}}. + {% endif %} + {% if states.calendar.birthdays.state == "on" %} + Today is {{ states.calendar.birthdays.attributes.message }} birthday! + # Add some snark + {% endif %} + {% endmacro %} + + {% macro current_conditions_outisde() %} + It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. + The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees. + {% endmacro %} + + {% macro current_conditions_inside() %} + The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees. The Climate is set to {{states.climate.home.state}}. + {% endmacro %} + + {% macro current_conditions_garage() %} + The garage is {{states.sensor.accurite_garage_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_garage_humidity.state|round}} percent. + {% endmacro %} + + {% macro daily_forecast() %} + The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. + {% endmacro %} + + {% macro overnight_forecast() %} + The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0d.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. + {% endmacro %} + + {% macro future_forecast() %} + Looking into the future you can expect {{states.sensor.dark_sky_daily_summary.state}}. + {% endmacro %} + + {% macro upcoming_birthdays() %} + {% if states.sensor.birthday_skylar.state | int == 1 %} + Tomorrow is Skylar's Birthday. + {% endif %} + {% if states.sensor.birthday_jeff.state | int == 1 %} + Tomorrow is Jeff's Birthday. + {% endif %} + {% if states.sensor.birthday_kat.state | int == 1 %} + Tomorrow is Katherine's Birthday. + {% endif %} + {% if states.sensor.anniversary_our_wedding.state | int == 1 %} + Tomorrow is Jeff and Katherine's Wedding Anniversary. + {% endif %} + {% if states.sensor.anniversary_our_wedding.state | int == 1 %} + Tomorrow is Jeff and Katherine's Wedding Anniversary. + {% endif %} + {% endmacro %} + + {% macro upcoming_holidays() %} + {% if states.sensor.holiday_halloween.state | int == 1 %} + Tomorrow is Halloween. I hope you have picked out a costume. + {{ [ "I'll be going as a dumb home. ", + "I've prepped the scary music. Just in case.", + "I'll be going as HAL 9000. The Pod Bay Doors are being installed today." + ] | random }} + {% elif states.sensor.holiday_halloween.state | int < 30 %} + {{ [ "There are only {{states.sensor.holiday_halloween.state}} days until Halloween.", + "Halloween is only {{states.sensor.holiday_halloween.state}} days away. It might not be enough time. ", + "Halloween is coming. {{states.sensor.holiday_halloween.state}} days and counting.", + "Only {{states.sensor.holiday_halloween.state}} days until Halloween.", + "You have {{states.sensor.holiday_halloween.state}} days until you need a costume." + ] | random }} + {% else %} + {% endif %} + {% if states.sensor.holiday_christmas.state | int == 1 %} + Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies! + {% elif states.sensor.holiday_christmas.state | int < 25 %} + There are only {{states.sensor.holiday_christmas.state}} days until christmas. + {% else %} + {% endif %} + {% endmacro %} + + {% macro skylar_dressed() %} + Skylar, + {% if is_state("sensor.birthday_skylar", "0") %} + Even birthday boys have to get dressed. So get to it. + {% else %} + If you haven't gotten dressed, + {{ [ "It is time to get dressed. ", + "It is time to put some real clothes on. ", + "it is now time to change your underwear.", + ] | random }} + {% endif %} + {% endmacro %} + + {% macro prebed_routine() %} + Skylar, + {{ [ "It is time to get in the bath. ", + "I cannot comminicate with the tub otherwise I would have started the water for you already, but it's still bath time ", + "My sensors are detecting a strange smell. I am running diagnostics, but in the mean time why don't you start a bath.", + ] | random }} + If you go now there may be time for stories. Don't forget to brush your teeth. + {% if is_state("sensor.weekday", "fri") %} + Oh, and tomorrow is Saturday, so why don't we sleep in. + {% endif %} + {% if is_state("sensor.weekday", "sat") %} + Oh, and tomorrow is Sunday, so why don't we sleep in. + {% endif %} + {% endmacro %} + + + {% macro school_today() %} + {% if is_state("calendar.skylar_school", "on") %} + Because you have school today! + {% if states.calendar.skylar_school.attributes.description == "early-release" %} + And guess what? It is early release! + {% endif %} + # {% if is_state("sensor.weekday", "fri") %} + # Plus, it is fun Friday! + # {% endif %} + {% endif %} + {% endmacro %} + + {% macro skylar_events() %} + {% if is_state("calendar.skylar_events", "on") %} + Skylar, You have {{ states.calendar.skylar_events.attributes.message }} today as well! + # {% if is_state("sensor.weekday", "fri") %} + # Plus, it is fun Friday! + # {% endif %} + {% endif %} + {% endmacro %} + + {% macro clothes_suggestion() %} + {% if is_state("sensor.clothing_forecast", "Freezing") %} + It is going to be freezing today so I suggest wearing long pants, and a heavy coat. + {% elif is_state("sensor.clothing_forecast","Cold") %} + It is going to be cold today so I suggest wearing long pants and a light jacket. + {% elif is_state("sensor.clothing_forecast", "Chilly") %} + It is going to be chilly today so I suggest wearing at least long pants. + {% elif is_state("sensor.clothing_forecast", "Nice") %} + It is going to be nice today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Toasty") %} + It is going to be a bit warm today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Hot") %} + It is going to be hot today so I suggest wearing shorts. + {% else %} + {% endif %} + {% endmacro %} + + {% macro chores() %} + {% if is_state("sensor.weekday", "mon") %} + {{ [ "Don't forget tomorrow is Trash Day. ", + "I advise you move the trash cans to the curb for the weekly pickup. ", + " The trash and recycle should go out" + ] | random }} + {% endif %} + {% endmacro %} + + {% macro door_status() %} + {% if is_state("group.external_doors", "on") %} + There are doors are open. + {% else %} + All doors are closed. + {% endif %} + {% endmacro %} + + {% macro jeff_location() %} + {% if is_state("sensor.jeff_location", "home") %} + {{ [ + "I am not sure why you are asking me,", + "You must be having vision problems.", + "I don't want to alarm you, but" + ] | random }} + Jeff is already home! + {% else %} + {% if is_state("sensor.jeff_destination", "na") %} + {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} + Jeff is currenly moving, but + {{ [ + "I am unable to determine his destination.", + "I am having trouble tracking him.", + "His destination is currently unknown." + ] | random }} + At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} + Jeff is currenly moving, but + {{ [ + "I am unable to determine his destination.", + "I am having trouble tracking him.", + "His destination is currently unknown." + ] | random }} + At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {% else %} + {% if is_state("sensor.jeff_location", "Lost") %} + Jeff is lost, but at last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. + {% else %} + Jeff is currently at {{ states.sensor.jeff_location.state }}. + {% endif %} + {% endif %} + {% elif is_state("sensor.jeff_destination", "home") %} + Jeff is currenly heading home and will be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. + {% else %} + Jeff is heading to {{ states.sensor.jeff_destination.state }}. + {% endif %} + {% endif %} + {% endmacro %} + + {% macro kat_location() %} + {% if is_state("sensor.kat_location", "home") %} + {{ [ + "I am not sure why you are asking me,", + "You must be having vision problems.", + "I don't want to alarm you, but" + ] | random }} + Katherine is already home! + {% else %} + {% if is_state("input_boolean.kat_travel_monitor", "on") %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {% else %} + {% if is_state("sensor.kat_location", "Lost") %} + Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + Katherine is currently at {{ states.sensor.kat_location.state }}. + {% endif %} + {% endif %} + {% else %} + {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} + Katherine is currenly moving, and + {{ [ + "I am unable to determine her destination.", + "I am having trouble tracking her.", + "Her destination is currently unknown." + ] | random }} + At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} + Katherine is currenly moving, and + {{ [ + "I am unable to determine her destination.", + "I am having trouble tracking her.", + "Her destination is currently unknown." + ] | random }} + At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + {% if is_state("sensor.kat_location", "Lost") %} + Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% else %} + I have located Katherine. She is at {{ states.sensor.kat_location.state }}, and + at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endmacro %} + + {% macro jeff_headed_home() %} + Jeff appears to be headed home. Based on current traffic conditions he should be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. + {% endmacro %} + + {% macro kat_headed_home() %} + Katherine appears to be headed home. Based on current traffic conditions she should be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. + {% endmacro %} + + {% macro traffic_conditions() %} + {%- if states.sensor.home_to_zoo.state|round > 50 %} + Traffic to the Zoo appears heavy than normnal. + {% else %} + Traffic to the Zoo is normal. + {% endif %} + Currently it will take {{states.sensor.home_to_zoo.state|round}} minutes to get to the Zoo. + + {%- if states.sensor.home_to_summit.state|round > 50 %} + Traffic to the Cox Automotive appears heavy than normnal. + {% else %} + Traffic to the Cox is normal. + {% endif %} + Currently it will take {{states.sensor.home_to_summit.state|round}} minutes to get to Cox Automotive. + {% endmacro %} + + + {% macro iss() %} + {{ [ + "But the International Space Station is passing over. Wave.", + "But The International Space Station just flew by.", + "But if you were to look up right now, and it was dark outside, and you happened to be looking in the right place you would see the International Space Station go by. But it's already passed by now." + ] | random}} + {% endmacro %} + + {% macro security_report() %} + {%- if states.input_boolean.sentry_mode.state == 'on' %} + {{ [ + "Sentry Mode is enabled.", + "Sentry mode is currently active.", + "Barn Door Protocol is currently in effect.", + "My security system is currently armed." + ] | random}} + {% else %} + {{ [ + "Sentry Mode is disabled.", + "Sentry mode is currently active.", + "My security system is currently disarmed." + ] | random}} + {% endif %} + {%- if states.group.external_doors.state == 'off' %} + All external doors are secured. + {% else %} + The following doors are open, + {%- if states.binary_sensor.front_door.state == 'on' %} + Front Door. + {% endif %} + {%- if states.binary_sensor.back_door.state == 'on' %} + Back Door. + {% endif %} + {%- if states.binary_sensor.laundry_room_door.state == 'on' %} + Laundry Room Door. + {% endif %} + {%- if states.binary_sensor.garage_door.state == 'on' %} + Garage Door. + {% endif %} + {%- if states.binary_sensor.side_door.state == 'on' %} + Side Door. + {% endif %} + {% endif %} + {% endmacro %} + + {%- macro washer_needs_emptying() -%} + {{ [ + "Just a reminder. Washing machine needs to be emptied.", + "I'm sure you have more inportant things to do, but the washing machine needs to be emptied.", + "Looks like the washing machine has completed it's cycle.", + "Don't forget to move the clothes to the dryer." + ] | random }} + {%- endmacro -%} + + {# ********************************************* #} + {# ******** Start the Speech routines ******** #} + {# ********************************************* #} + + {% if call_greeting == 1 %} + {{ greeting() }} + {% endif %} + + {% if call_confirmation == 1 %} + {{ confirmation() }} + {% endif %} + + {% if call_interuption == 1 %} + {{ interuption() }} + {% endif %} + + {% if call_issue == 1 %} + {{ issue() }} + {% endif %} + + {% if call_morning_greeting == 1 %} + {{ morning_greeting() }} + {% endif %} + + {% if call_evening_greeting == 1 %} + {{ evening_greeting() }} + {% endif %} + + {% if states.sensor.nws_alerts.state | int > 0 and call_weather_alerts == 1 %} + {{ weather_alerts() }} + {% endif %} + + {% if call_todays_events == 1 %} + {{ todays_events() }} + {% endif %} + + {% if call_current_conditions_outside == 1 %} + {{ current_conditions_outside() }} + {% endif %} + + {% if call_current_conditions_inside == 1 %} + {{ current_conditions_inside() }} + {% endif %} + + {% if call_current_conditions_garage == 1 %} + {{ current_conditions_garage() }} + {% endif %} + + {% if call_daily_forecast == 1 %} + {{ daily_forecast() }} + {% endif %} + + {% if call_overnight_forecast == 1 %} + {{ overnight_forecast() }} + {% endif %} + + {% if call_future_forecast == 1 %} + {{ future_forecast() }} + {% endif %} + + {% if call_upcoming_birthdays == 1 %} + {{ upcoming_birthdays() }} + {% endif %} + + {% if call_upcoming_holidays == 1 %} + {{ upcoming_holidays() }} + {% endif %} + + {% if call_skylar_dressed == 1 %} + {{ skylar_dressed() }} + {% endif %} + + {% if call_prebed_routine == 1 %} + {{ prebed_routine() }} + {% endif %} + + {% if call_school_today == 1 %} + {{ school_today() }} + {% endif %} + + {% if call_skylar_events == 1 %} + {{ skylar_events() }} + {% endif %} + + {% if call_clothes_suggestion == 1 %} + {{ clothes_suggestion() }} + {% endif %} + + {% if call_chores == 1 %} + {{ chores() }} + {% endif %} + + {% if call_door_status == 1 %} + {{ door_status() }} + {% endif %} + + {% if call_jeff_location == 1 %} + {{ jeff_location() }} + {% endif %} + + {% if call_kat_location == 1 %} + {{ kat_location() }} + {% endif %} + + {% if call_jeff_headed_home == 1 %} + {{ jeff_headed_home() }} + {% endif %} + + {% if call_kat_headed_home == 1 %} + {{ kat_headed_home() }} + {% endif %} + + {% if call_traffic_conditions == 1 %} + {{ traffic_conditions() }} + {% endif %} + + {{ usps }} + + {% if call_iss == 1 %} + {{ iss() }} + {% endif %} + + {% if call_security_report == 1 %} + {{ security_report() }} + {% endif %} + + {% if call_washer_needs_emptying == 1 %} + {{ washer_needs_emptying() }} + {% endif %} + + {{ welcome_home }} + + {{ speech_message }} + ############################################################################### # Twitter @@ -286,98 +891,85 @@ script: ############################################################################### # Morning Report ############################################################################### - morning_report: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/morning_report.yaml + # morning_report: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/morning_report.yaml ############################################################################### # Skylar Get Dressed ############################################################################### - skylar_morning_greeting: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/skylar_morning.yaml + # skylar_morning_greeting: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/skylar_morning.yaml ############################################################################### # Nightly Report ############################################################################### - nightly_report: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/nightly_report.yaml + # nightly_report: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/nightly_report.yaml - test_nightly_report: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/nightly_report.yaml + # test_nightly_report: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/nightly_report.yaml ############################################################################### # Weather Report ############################################################################### weather_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/weather_report.yaml - - delay: - minutes: 5 - - service: script.turn_off - entity_id: script.weather_report + - service: script.ah_report + data: + call_weather_alerts: 1 + call_current_conditions_outisde: 1 + call_current_conditions_inside: 1 + call_current_conditions_garage: 1 + call_daily_forecast: 1 + call_overnight_forecast: 1 + call_future_forecast: 1 + ############################################################################### # Traffic Report ############################################################################### traffic_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/traffic_report.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.traffic_report + - service: script.ah_report + data: + call_traffic_conditions: 1 ############################################################################### # Security Report ############################################################################### security_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/security_report.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.security_report + - service: script.ah_report + data: + call_security_report: 1 ############################################################################### # Jeff Traffic Reports ############################################################################### jeff_eta_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jeff_eta.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.jeff_eta_report + - service: script.ah_report + data: + call_jeff_location: 1 jeff_headed_home_annc: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jeff_heading_home.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.jeff_headed_home_annc + - service: script.ah_report + data: + call_jeff_headed_home: 1 ############################################################################### @@ -385,30 +977,22 @@ script: ############################################################################### kat_eta_report: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_eta.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.kat_eta_report + - service: script.ah_report + data: + call_kat_location: 1 kat_headed_home_annc: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_heading_home.yaml - - delay: - minutes: 2 - - service: script.turn_off - entity_id: script.kat_headed_home_annc + - service: script.ah_report + data: + call_kat_headed_home: 1 ############################################################################### # Prebed Routing ############################################################################### - prebed_routine: - sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/skylar_night.yaml - # message: > - # Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. + # prebed_routine: + # sequence: + # - service: script.jarvis_voice + # data_template: + # message: !include ../templates/skylar_night.yaml + # # message: > + # # Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. diff --git a/packages/presence.yaml b/packages/presence.yaml index 4f90e13..5e0f9fc 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -144,9 +144,11 @@ automation: action: - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_arrived_at_work.yaml + - service: script.ah_report + data: + speech_message: 'Kat has arrived at worked.' + call_interuption: 1 + - id: kat_leaves_zoo alias: Kat Leaves Zoo Notification initial_state: true @@ -159,6 +161,11 @@ automation: action: - service: input_boolean.turn_on entity_id: input_boolean.kat_travel_monitor + - service: script.ah_report + data: + call_interuption: 1 + call_kat_headed_home: 1 + - id: '1550109528753' alias: Jeff Is Heading Home initial_state: true @@ -168,6 +175,10 @@ automation: condition: [] action: - service: script.jeff_destination_home + - service: script.ah_report + data: + call_interurption: 1 + call_jeff_headed_home: 1 - id: family_has_arrived alias: Family Has arrived @@ -206,6 +217,7 @@ automation: - service: script.standby - service: script.washer_finished_notification_audible initial_state: true + - id: family_has_left alias: Family Has Left initial_state: true @@ -226,6 +238,7 @@ automation: - service: script.lockdown - service: script.lockdown_issue - service: script.all_fans_off + - id: jeff_is_home alias: Jeff is Home initial_state: true @@ -234,10 +247,6 @@ automation: event: enter platform: zone zone: zone.home - # - entity_id: person.jeffrey - # event: enter - # platform: zone - # zone: zone.home action: - service: script.family_is_home - service: script.jeff_is_home @@ -245,6 +254,7 @@ automation: - service: script.driveway_on - entity_id: input_boolean.jeff_travel_monitor service: input_boolean.turn_off + - id: jeff_arrives_summit alias: Jeff Arrives At Summit trigger: @@ -262,6 +272,7 @@ automation: who: "kat" message: "Jeff has arrived at Summit" initial_state: true + - id: jeff_arrives_summit_notification alias: Notify Kat Jeff At Summit trigger: @@ -276,6 +287,7 @@ automation: action: - service: script.jeff_destination_na initial_state: true + - id: jeff_leaves_summit alias: Jeff Leaves Summit initial_state: true @@ -287,6 +299,7 @@ automation: action: - service: input_boolean.turn_off entity_id: input_boolean.jeff_traffic_alert_home + - id: kat_is_home alias: Kat is Home initial_state: true @@ -304,37 +317,30 @@ automation: - service: script.driveway_on - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor - - - id: annc_arrival_jeff - alias: 'Announce Jeff Arrived' + + - id: welcome_home + alias: Welcome Home trigger: - platform: state entity_id: - - device_tracker.jeffreystonesiphone + - person.jeffrey + - person.katherine from: 'not_home' to: 'home' - condition: - - condition: state - entity_id: sensor.family_status - state: Home action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: !include ../templates/jeff_home_annc.yaml - - - id: annc_arrival_kat - alias: 'Announce Kat Arrived' - trigger: - - platform: state - entity_id: - - device_tracker.katherinestonesiphone - from: 'not_home' - to: 'home' - condition: - - condition: state - entity_id: sensor.family_status - state: Home - action: - - service: script.jarvis_voice - data_template: - message: !include ../templates/kat_home_annc.yaml \ No newline at end of file + welcome_home: > + {% set person = trigger.to_state.attributes.friendly_name %} + {%- macro greeting_sentence(person) -%} + {{ [ + person + " has arrived.", + person + " is in the neighborhood.", + person + " is arriving.", + "My sensors are picking up the presence of additional humans. " ~ person +" has been identified as home.", + person + " has finally made it home." + ] | random }} + {%- endmacro -%} + {{greeting_sentence(person)}} + call_interuption: 1 + diff --git a/packages/space.yaml b/packages/space.yaml index 1a3ed60..e19ed7b 100755 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -82,11 +82,11 @@ automation: to: 'on' from: 'off' action: - - service: script.jarvis_voice - data_template: - message: !include ../templates/iss_report.yaml + - service: script.ah_report + data: + call_interuption: 1 + call_iss: 1 - - id: full_moon_tweet initial_state: true alias: 'Full Moon -Tweet' diff --git a/packages/usps.yaml b/packages/usps.yaml index 963b1b8..ce4c733 100755 --- a/packages/usps.yaml +++ b/packages/usps.yaml @@ -64,19 +64,15 @@ automation: - condition: template value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}' action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: !include ../templates/jarvis_interuptions.yaml - - delay: - seconds: 2 - - service: script.jarvis_notify - data_template: - message: > + usps: >- {%- if states.sensor.usps_mail.state | int == 1 -%} USPS is delivering {{ states.sensor.usps_mail.state }} piece of mail today. {%- else -%} USPS is delivering {{ states.sensor.usps_mail.state }} pieces of mail today. {%- endif -%} + call_interuption: 1 - service: script.text_notify data_template: who: "jeff" @@ -104,16 +100,12 @@ automation: - condition: template value_template: '{{ ((now().hour | int) > 7) and ((now().hour | int) < 16) }}' action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: !include ../templates/jarvis_interuptions.yaml - - delay: - seconds: 2 - - service: script.jarvis_notify - data_template: - message: > + usps: > {%- if states.sensor.usps_packages.state | int == 1 -%} USPS is delivering {{ states.sensor.usps_packages.state }} package today. {%- else -%} USPS is delivering {{ states.sensor.usps_packages.state }} packages today. {%- endif -%} + call_interuption: 1 diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index f4e44c9..5f082ef 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -217,18 +217,6 @@ automation: - service: media_player.media_stop entity_id: media_player.hass_speaker - - id: play_weather_report - alias: Play Weather Report - initial_state: true - trigger: - - entity_id: input_boolean.play_weather_report - from: 'Off' - platform: state - to: 'On' - action: - - service: script.turn_on - entity_id: script.weather_report - - service: script.voice_reports_off script: nws_popup_on_wx_alert: diff --git a/scripts.yaml b/scripts.yaml index 5374016..7706e0c 100755 --- a/scripts.yaml +++ b/scripts.yaml @@ -8,18 +8,10 @@ washer_finished_notification_audible: - condition: state entity_id: sensor.washer_status state: complete - - service: script.jarvis_voice - data_template: - message: > - {%- macro washing_annc() -%} - {{ [ - "Just a reminder. Washing machine needs to be emptied.", - "I'm sure you have more inportant things to do, but the washing machine needs to be emptied.", - "Looks like the washing machine has completed it's cycle.", - "Don't forget to move the clothes to the dryer." - ] | random }} - {%- endmacro -%} - {{washing_annc()}} + - service: script.ah_report + data: + call_interuption: 1 + call_washer_needs_emptying: 1 girl_eyes_on_you: sequence: - service: media_player.play_media @@ -298,19 +290,10 @@ appliances_off: - data: entity_id: switch.artemis service: switch.turn_off -voice_reports_off: - sequence: - - delay: - minutes: 5 - - service: input_boolean.turn_off - entity_id: input_boolean.play_weather_report - - service: script.turn_off - entity_id: script.weather_report -jeff_text_test: +jeff_speech_test: sequence: - - service: script.text_notify - data_template: - who: "jeff" - title: "Test Text" - message: "This is just a test." \ No newline at end of file + - service: script.ah_report + data: + call_kat_location: 1 + diff --git a/templates/halloween_countdown.yaml b/templates/halloween_countdown.yaml deleted file mode 100755 index 677abbc..0000000 --- a/templates/halloween_countdown.yaml +++ /dev/null @@ -1,27 +0,0 @@ - > - {# Halloween Countdown #} - {%- macro getCountDown() -%} - "Halloween is only {{ states.sensor.holiday_halloween.state }} days away! " - {{- [ - " Have you picked a costume? I'm going as Disney's Haunted Mansion.", - " I'm going as a dumb home. Get it? " - ] | random -}} - {%- endmacro -%} - {%- macro getTags() -%} - #homeassistant #iot #smarthome - {%- endmacro -%} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getCountDown() }} - {{ getTags() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/iss_report.yaml b/templates/iss_report.yaml deleted file mode 100755 index a988a20..0000000 --- a/templates/iss_report.yaml +++ /dev/null @@ -1,30 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {{ [ - "But the International Space Station is passing over. Wave.", - "But The International Space Station just flew by.", - "But if you were to look up right now, and it was dark outside, and you happened to be looking in the right place you would see the International Space Station go by. But it's already passed by now." - ] | random}} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/jarvis_confirmations.yaml b/templates/jarvis_confirmations.yaml deleted file mode 100755 index f79933e..0000000 --- a/templates/jarvis_confirmations.yaml +++ /dev/null @@ -1,29 +0,0 @@ - > - {% macro getConfirmation() %} - {{ [ - "Okay.", - "If you insist.", - "I am afraid I can't do that Dave,,,I am kidding,", - "Leave it to me.", - "As you wish.", - "By your command.", - "Affirmative.", - "No Problem.", - "I think I can handle that.", - "Working on it now." - ] | random }} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getConfirmation() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jarvis_interuptions.yaml b/templates/jarvis_interuptions.yaml deleted file mode 100755 index 57a448b..0000000 --- a/templates/jarvis_interuptions.yaml +++ /dev/null @@ -1,25 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jarvis_issue.yaml b/templates/jarvis_issue.yaml deleted file mode 100755 index 838d728..0000000 --- a/templates/jarvis_issue.yaml +++ /dev/null @@ -1,23 +0,0 @@ - > - {% macro getIssue() %} - {{ [ - "I have detected an issue!", - "We have a problem!", - "You might not like this.", - "There is something that needs your attention." - ] | random }} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIssue() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_eta.yaml b/templates/jeff_eta.yaml deleted file mode 100755 index 4f21c4b..0000000 --- a/templates/jeff_eta.yaml +++ /dev/null @@ -1,55 +0,0 @@ - > - {% macro getIntro() %} - {% if is_state("sensor.jeff_location", "home") %} - {{ [ - "I am not sure why you are asking me,", - "You must be having vision problems.", - "I don't want to alarm you, but" - ] | random }} - Jeff is already home! - {% else %} - {% if is_state("sensor.jeff_destination", "na") %} - {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} - Jeff is currenly moving, but - {{ [ - "I am unable to determine his destination.", - "I am having trouble tracking him.", - "His destination is currently unknown." - ] | random }} - At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. - {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} - Jeff is currenly moving, but - {{ [ - "I am unable to determine his destination.", - "I am having trouble tracking him.", - "His destination is currently unknown." - ] | random }} - At last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. - {% else %} - {% if is_state("sensor.jeff_location", "Lost") %} - Jeff is lost, but at last check was {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes from home. - {% else %} - Jeff is currently at {{ states.sensor.jeff_location.state }}. - {% endif %} - {% endif %} - {% elif is_state("sensor.jeff_destination", "home") %} - Jeff is currenly heading home and will be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. - {% else %} - Jeff is heading to {{ states.sensor.jeff_destination.state }}. - {% endif %} - {% endif %} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_heading_home.yaml b/templates/jeff_heading_home.yaml deleted file mode 100755 index 7880797..0000000 --- a/templates/jeff_heading_home.yaml +++ /dev/null @@ -1,24 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - Jeff appears to be headed home. Based on current traffic conditions he should be here in {{states.sensor.jeff_ett_home.attributes.duration | round}} minutes. - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/jeff_home_annc.yaml b/templates/jeff_home_annc.yaml deleted file mode 100755 index a18a187..0000000 --- a/templates/jeff_home_annc.yaml +++ /dev/null @@ -1,33 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {% endmacro %} - {% macro getMessage() %} - {{ [ - "Jeff has arrived.", - "Jeff is in the neighborhood.", - "Jeff is arriving.", - "Jeff has finally made it home." - ] | random }} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - {{ getMessage() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_arrived_at_work.yaml b/templates/kat_arrived_at_work.yaml deleted file mode 100755 index 81f6ae8..0000000 --- a/templates/kat_arrived_at_work.yaml +++ /dev/null @@ -1,26 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - Katherine has arrived at work. - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_eta.yaml b/templates/kat_eta.yaml deleted file mode 100755 index 97f4a09..0000000 --- a/templates/kat_eta.yaml +++ /dev/null @@ -1,64 +0,0 @@ - > - {% macro getIntro() %} - {% if is_state("sensor.kat_location", "home") %} - {{ [ - "I am not sure why you are asking me,", - "You must be having vision problems.", - "I don't want to alarm you, but" - ] | random }} - Katherine is already home! - {% else %} - {% if is_state("input_boolean.kat_travel_monitor", "on") %} - {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} - Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. - {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} - Katherine is currently heading home and will be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. - {% else %} - {% if is_state("sensor.kat_location", "Lost") %} - Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% else %} - Katherine is currently at {{ states.sensor.kat_location.state }}. - {% endif %} - {% endif %} - {% else %} - {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} - Katherine is currenly moving, and - {{ [ - "I am unable to determine her destination.", - "I am having trouble tracking her.", - "Her destination is currently unknown." - ] | random }} - At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {%- elif states.device_tracker.life360_kat_stone.attributes.driving == True %} - Katherine is currenly moving, and - {{ [ - "I am unable to determine her destination.", - "I am having trouble tracking her.", - "Her destination is currently unknown." - ] | random }} - At last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% else %} - {% if is_state("sensor.kat_location", "Lost") %} - Katherine is lost, but at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% else %} - I have located Katherine. She is at {{ states.sensor.kat_location.state }}, and - at last check was {{states.sensor.kat_ett_home.attributes.duration | round}} minutes from home. - {% endif %} - {% endif %} - {% endif %} - {% endif %} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_heading_home.yaml b/templates/kat_heading_home.yaml deleted file mode 100755 index 3b4f6a8..0000000 --- a/templates/kat_heading_home.yaml +++ /dev/null @@ -1,24 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - Katherine appears to be headed home. Based on current traffic conditions she should be here in {{states.sensor.kat_ett_home.attributes.duration | round}} minutes. - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/kat_home_annc.yaml b/templates/kat_home_annc.yaml deleted file mode 100755 index 3588427..0000000 --- a/templates/kat_home_annc.yaml +++ /dev/null @@ -1,33 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but.", - "I thought you might like to know." - ] | random }} - {% endmacro %} - {% macro getMessage() %} - {{ [ - "Katherine has arrived.", - "Katherine is in the neighborhood.", - "Katherine is arriving.", - "Katherine has finally made it home." - ] | random }} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - {{ getMessage() }} - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/morning_report.yaml b/templates/morning_report.yaml deleted file mode 100755 index dda68f7..0000000 --- a/templates/morning_report.yaml +++ /dev/null @@ -1,95 +0,0 @@ - > - {% macro getGreeting() %} - {{ [ "Good morning Anchorage House. Rise and Shine. ", - "Good morning everyone. ", - "Good morning. The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", - "Good morning. The early bird gets the worm.", - "Good morning from the bridge.", - "Pardom the interuption.", - "I hope I am not interupting, but I think this would be a good time for the morning report." - ] | random }} - {% if is_state("input_boolean.guest_mode", "on") %} - {{ [ "And a special welcome to our guests. ", - "And good morning to our guests as well. ", - "Hey look at that, someone came to visit Anchorage House. Hope you slept well." - ] | random }} - {% endif %} - {% endmacro %} - {% macro getTodaysEvent() %} - {% if is_state("sensor.holiday_halloween","0") %} - This is Halloween, this is halloween. Happy Halloween! - {% endif %} - {% if is_state("sensor.holiday_christmas","0") %} - Merry Christmas Everyone! - {% endif %} - {% if is_state("sensor.anniversary_our_wedding","0") %} - Happy Anniversary! It has been an amazing {{ states.sensor.anniversary_our_wedding.attributes.years }} years! - {% endif %} - {% if is_state("calendar.holidays_in_united_states", "on") %} - Today is {{states.calendar.holidays_in_united_states.attributes.message}}. - {% endif %} - {% endmacro %} - {% macro getCurrentConditions() %} - It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. - The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees and - The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees. The Climate is set to {{states.climate.home.state}}. - {% endmacro %} - {% macro getForecast() %} - The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. - {% endmacro %} - - {% macro getBirthdays() %} - {% if states.calendar.birthdays.state == "on" %} - Today is {{ states.calendar.birthdays.attributes.message }} birthday! - {% else %} - {% if states.sensor.birthday_skylar.state | int == 1 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_jeff.state | int == 1 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int == 1 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endif %} - {% endmacro %} - {% macro getAnniversary() %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int == 1 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {% endif %} - {% if states.sensor.holiday_christmas.state | int == 1 %} - Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies! - {% elif states.sensor.holiday_christmas.state | int < 25 %} - There are only {{states.sensor.holiday_christmas.state}} days until christmas. - {% else %} - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getGreeting() }} - {{ getTodaysEvent() }} - {{ getCurrentConditions() }} - {{ getForecast() }} - {{ getBirthdays() }} - {{ getAnniversary() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/nightly_report.yaml b/templates/nightly_report.yaml deleted file mode 100755 index ddeec9e..0000000 --- a/templates/nightly_report.yaml +++ /dev/null @@ -1,72 +0,0 @@ - > - {% macro getSnark() %} - {{ [ "Good evening, ", - "Pardon the interuption, ", - "Good Evening Anchorage House, " - ] | random }} - {{ [ "I thought you might like to know. ", - "Here is the nightly report.", - "Before I call it a day I wanted to let you know," - ] | random }} - {% endmacro %} - {% macro getForecast() %} - The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0d.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. - {% endmacro %} - {% macro getTrashDay() %} - {% if is_state("sensor.weekday", "mon") %} - {{ [ "Don't forget tomorrow is Trash Day. ", - "I advise you move the trash cans to the curb for the weekly pickup. ", - " The trash and recycle should go out" - ] | random }} - {% endif %} - {% endmacro %} - {% macro getBirthdays() %} - {% if states.sensor.birthday_skylar.state | int == 1 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_skylar.state | int > 1 %} - {% if states.sensor.birthday_skylar.state | int < 5 %} - Skylar's birthday is in {{states.sensor.birthday_skylar.state}} days! - {% endif %} - {% endif %} - {% if states.sensor.birthday_jeff.state | int == 1 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int == 1 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int == 1 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {{ [ "I'll be going as a dumb home. ", - "I've prepped the scary music. Just in case.", - "I'll be going as HAL 9000." - ] | random }} - {% endif %} - {% if states.sensor.holiday_christmas.state | int == 1 %} - Tomorrow is Christmas. It's practically here! - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getSnark() }} - {{ getForecast() }} - {{ getTrashDay() }} - {{ getBirthdays() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/prebed_routing.yaml b/templates/prebed_routing.yaml deleted file mode 100755 index aa24037..0000000 --- a/templates/prebed_routing.yaml +++ /dev/null @@ -1,50 +0,0 @@ - > - {% macro getForecast() %} - The low tonight will be {{states.sensor.dark_sky_overnight_low_temperature_0.state | round}} degrees and there is a {{states.sensor.dark_sky_precip_probability_0.state|round}} percent chance of rain. - {% endmacro %} - {% macro getTrashDay() %} - {% if is_state("sensor.weekday", "mon") %} - Tomorrow is trash day! - {% endif %} - {% endmacro %} - {% macro getBirthdays() %} - {% if states.sensor.birthday_skylar.state | int < 2 %} - Tomorrow is Skylar's Birthday. - {% endif %} - {% if states.sensor.birthday_jeff.state | int < 2 %} - Tomorrow is Jeff's Birthday. - {% endif %} - {% if states.sensor.birthday_kat.state | int < 2 %} - Tomorrow is Katherine's Birthday. - {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int < 2 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} - {% endmacro %} - {% macro getHolidays() %} - {% if states.sensor.holiday_halloween.state | int < 2 %} - Tomorrow is Halloween. Hope you have picked out a costume. - {% endif %} - {% if states.sensor.holiday_christmas.state | int < 2 %} - Tomorrow is Christmas. It's practically here! - {% endif %} - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. - {{ getForecast() }} - {{ getTrashDay() }} - {{ getBirthdays() }} - {{ getHolidays() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/security_report.yaml b/templates/security_report.yaml deleted file mode 100755 index 50e069b..0000000 --- a/templates/security_report.yaml +++ /dev/null @@ -1,22 +0,0 @@ - > - {% macro getIntro() %} - {% if is_state("group.external_doors", "on") %} - There are doors are open. - {% else %} - All doors are closed. - {% endif %} - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file diff --git a/templates/skylar_morning.yaml b/templates/skylar_morning.yaml deleted file mode 100755 index ea07d1c..0000000 --- a/templates/skylar_morning.yaml +++ /dev/null @@ -1,75 +0,0 @@ - > - {% macro getIntro() %} - - {{ [ "Pardom me, Skylar,, ", - "Good morning Skylar, This is your digital assistant, Jarvis ", - "This is your cruise director with your morning announcements.", - ] | random }} - {% endmacro %} - {% macro getDressed() %} - {% if is_state("sensor.birthday_skylar", "0") %} - First, Happy Birthday Skylar! Second, even birthday boys have to get dressed. So get to it. - {% else %} - If you haven't gotten dressed, - {{ [ "It is time to get dressed. ", - "It is time to put some real clothes on. ", - "it is now time to change your underwear.", - ] | random }} - {% endif %} - {% endmacro %} - {% macro getSchoolDay() %} - {% if is_state("calendar.skylar_school", "on") %} - Because you have school today! - {% if states.calendar.skylar_school.attributes.description == "early-release" %} - And guess what? It is early release! - {% endif %} - # {% if is_state("sensor.weekday", "fri") %} - # Plus, it is fun Friday! - # {% endif %} - {% endif %} - {% endmacro %} - {% macro getEvents() %} - {% if is_state("calendar.skylar_events", "on") %} - You have {{ states.calendar.skylar_events.attributes.message }} today! - # {% if is_state("sensor.weekday", "fri") %} - # Plus, it is fun Friday! - # {% endif %} - {% endif %} - {% endmacro %} - {% macro getClothesSuggestion() %} - {% if is_state("sensor.clothing_forecast", "Freezing") %} - It is going to be freezing today so I suggest wearing long pants, and a heavy coat. - {% elif is_state("sensor.clothing_forecast","Cold") %} - It is going to be cold today so I suggest wearing long pants and a light jacket. - {% elif is_state("sensor.clothing_forecast", "Chilly") %} - It is going to be chilly today so I suggest wearing at least long pants. - {% elif is_state("sensor.clothing_forecast", "Nice") %} - It is going to be nice today so I suggest wearing shorts. - {% elif is_state("sensor.clothing_forecast", "Toasty") %} - It is going to be a bit warm today so I suggest wearing shorts. - {% elif is_state("sensor.clothing_forecast", "Hot") %} - It is going to be hot today so I suggest wearing shorts. - {% else %} - {% endif %} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - {{ getDressed() }} - {{ getSchoolDay() }} - {{ getEvents() }} - {{ getClothesSuggestion() }} - - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/skylar_night.yaml b/templates/skylar_night.yaml deleted file mode 100755 index 7ca35ed..0000000 --- a/templates/skylar_night.yaml +++ /dev/null @@ -1,38 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "Pardon me,", - "Excuse me,", - "I do not mean to interupt, but," - ] | random }} - Skylar. Bedtime is in thirty minutes. - {% endmacro %} - {% macro getPrebedRoutine() %} - If you are taking a bath now is the time to get in the tub, so you have time to brush teeth and read stories. - Otherwise it is time to put on your pajamas. - {% endmacro %} - {% macro getReminders() %} - Don't forget to feed your fish. - {% if is_state("sensor.weekday", "fri") %} - Oh, and tomorrow is the weekend, so why don't we sleep in. - {% endif %} - {% endmacro %} - - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - It is {{ now().strftime("%I:%M %p") }}. - {{ getIntro() }} - {{ getPrebedRoutine() }} - {{ getReminders() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} diff --git a/templates/traffic_report.yaml b/templates/traffic_report.yaml deleted file mode 100755 index 65abd50..0000000 --- a/templates/traffic_report.yaml +++ /dev/null @@ -1,34 +0,0 @@ - > - {% macro getIntro() %} - {{ [ - "You might not like what I have to say.", - "Are you sure you want to know?", - "I can tell you but you are probably not going to like it.", - "Here you go." - ] | random }} - Under current traffic conditions - {% endmacro %} - {% macro getTrafficZoo() %} - Zoo Atlanta is {{states.sensor.home_to_zoo.state|round}} minutes away - {% endmacro %} - {% macro getTrafficCox() %} - And Cox Automotive is {{states.sensor.home_to_summit.state|round}} minutes away by car. - {% endmacro %} - - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getTrafficZoo() }} - {{ getTrafficCox() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} - - diff --git a/templates/weather_report.yaml b/templates/weather_report.yaml deleted file mode 100755 index d3c53e8..0000000 --- a/templates/weather_report.yaml +++ /dev/null @@ -1,31 +0,0 @@ - > - {% macro getCurrent() %} - It's currently {{states.sensor.dark_sky_summary.state}} and {{states.sensor.dark_sky_temperature.state|round}} degrees according to Dark Sky. - The back porch is {{states.sensor.accurite_back_porch_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_back_porch_humidity.state|round}} percent. - The garage is {{states.sensor.accurite_garage_temperature.state|round}} degrees with a humidity of {{states.sensor.accurite_garage_humidity.state|round}} percent. - The inside temperature is {{states.climate.home.attributes.current_temperature|round}} degrees and the Climate is set to {{states.climate.home.state}}. - {% endmacro %} - {% macro getTodayForecast() %} - The rest of the day should be {{states.sensor.dark_sky_summary_0d.state}} with a high of {{states.sensor.dark_sky_daytime_high_temperature_0d.state|round}} degrees. There is a {{states.sensor.dark_sky_precip_probability_0d.state|round}} percent chance of rain. - {% endmacro %} - {% macro getForecast() %} - Looking into the future you can expect {{states.sensor.dark_sky_daily_summary.state}}. - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getCurrent() }} - {{ getTodayForecast() }} - {{ getForecast() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} - - diff --git a/templates/welcome_home.yaml b/templates/welcome_home.yaml deleted file mode 100755 index d8d3f77..0000000 --- a/templates/welcome_home.yaml +++ /dev/null @@ -1,18 +0,0 @@ - > - {% macro getIntro() %} - - {% endmacro %} - {# a macro that removes all newline characters, empty spaces, and returns formatted text #} - {%- macro cleanup(data) -%} - {%- for item in data.split("\n") if item | trim != "" -%} - {{ item | trim }} {% endfor -%} - {%- endmacro -%} - - {# a macro to call all macros :) #} - {%- macro mother_of_all_macros() -%} - {{ getIntro() }} - - {%- endmacro -%} - - {# Call the macro #} - {{- cleanup(mother_of_all_macros()) -}} \ No newline at end of file From babba86b1781ecdd8db12b49355e790af71afb57 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 21:38:24 -0400 Subject: [PATCH 049/106] Trying to prevent new HA Version twitter spam after reboot --- automations.yaml | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/automations.yaml b/automations.yaml index a41749b..b2189ea 100755 --- a/automations.yaml +++ b/automations.yaml @@ -458,8 +458,8 @@ -- id: '1558620708807' - alias: Upstairs Cooling On +- id: upstairs_fan_on + alias: Upstairs Fan On initial_state: true trigger: - entity_id: binary_sensor.upstairs_occupancy @@ -472,7 +472,7 @@ entity_id: sensor.upstairs_temperature action: - data: - entity_id: switch.box_fans + entity_id: switch.upstairs_fan service: switch.turn_on - id: '1558630577206' alias: Garage Is Open at 9pm @@ -517,34 +517,18 @@ - data: entity_id: switch.living_room_fan service: switch.turn_on -- id: '1562067557778' - alias: Upstairs Fan On - initial_state: true - trigger: - - entity_id: binary_sensor.upstairs_occupancy - from: 'Off' - platform: state - to: 'On' - condition: - - condition: state - entity_id: switch.upstairs_fan - state: 'Off' - action: - - data: - entity_id: switch.upstairs_fan - service: switch.turn_on - id: '1562067639239' alias: Upstairs Fan Off initial_state: true trigger: - entity_id: binary_sensor.upstairs_occupancy - from: 'On' + from: 'on' platform: state - to: 'Off' + to: 'off' condition: - condition: state entity_id: switch.upstairs_fan - state: 'On' + state: 'on' action: - data: entity_id: switch.upstairs_fan @@ -559,6 +543,10 @@ - data: message: Remember to take meds service: notify.kat_ios + +########################## +# My Attempt at preventing twitter from being spammed with new HA tweets on reboot + - id: new_ha alias: New HA initial_state: true @@ -580,3 +568,4 @@ - service: script.twitter_new_ha - service: input_boolean.turn_off entity_id: input_boolean.new_ha_announcement +########################### \ No newline at end of file From 688747c294b22a15ae04697dff5418f805643744 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 21:39:01 -0400 Subject: [PATCH 050/106] Working on a chore system - might change direction --- input_boolean.yaml | 90 ++++++++++++++++++++++++++++++++++----------- input_datetime.yaml | 9 +++++ 2 files changed, 77 insertions(+), 22 deletions(-) diff --git a/input_boolean.yaml b/input_boolean.yaml index b4c329b..bd4ab73 100755 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -73,27 +73,73 @@ traffic_reports: name: traffic_reports sun_reports: name: Sun Reports -#tweet_system: -# name: Tweet System -# icon: mdi:twitter -# tweet_ha_releases: -# name: Tweet HA Releases -# icon: mdi:twitter -# tweet_iss: -# name: Tweet ISS Sightings -# icon: mdi:twitter -# tweet_snark: -# name: Tweet Snark -# icon: mdi:twitter -# tweet_stats: -# name: Tweet Stats -# icon: mdi:twitter -# washer_notification: -# name: Washer Notification -# icon: mdi:speaker-wireless -# play_weather_report: -# name: Play Weather Report -# icon: mdi:speaker-wireless new_ha_announcement: name: New HA Announcement - icon: mdi:twitter \ No newline at end of file + icon: mdi:twitter + + +##################### +# Chore List +##################### +# Everyday +feed_fish: + name: Feed Fish + icon: mdi:fishbowl +wash_dishes: + name: Wash Dishes + icon: mdi:dishwasher + +# Monday | Wednesday | Friday +clean_litterbox: + name: Clean Litterbox + icon: mdi:cat + +# Monday +clean_towel_day: + name: Clean Towel Day + + +# Tuesday +vacuum: + name: Vavuum Living Room + +dust: + name: Dust + +mop_kitchen: + name: Mop Kitchen + + + + + +# Friday +clean_sheet_day: + name: Clean Sheet Day + + + +# Weekend +clean_kitchen: + name: Clean Kitchen +clean_bathrooms: + name: Clean Bathrooms +mow_yard: + name: Mow Yard + +# Sunday +menu_day: + name: Menu Day + +# Monthly +wash_mattress_protector: + name: Wash Mattress Protector + +clean_fish_tank: + name: Clean Fish Tank + +heartworm: + name: Heartworm + icon: mdi:dog-side + + diff --git a/input_datetime.yaml b/input_datetime.yaml index a3c793d..b321c05 100755 --- a/input_datetime.yaml +++ b/input_datetime.yaml @@ -34,3 +34,12 @@ kat_pill_reminder: name: Kat Pill Reminder has_date: false has_time: true +coffee_time: + name: Coffee Time + has_date: false + has_time: true +heartworm_reminder: + name: Heartworm Reminder + has_date: true + has_time: false + From f06ba2b4889704c9144c82299631cb182988ee2c Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 21:39:21 -0400 Subject: [PATCH 051/106] Removed unused package: --- packages/maintenance.yaml | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 packages/maintenance.yaml diff --git a/packages/maintenance.yaml b/packages/maintenance.yaml deleted file mode 100755 index 09d1e62..0000000 --- a/packages/maintenance.yaml +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################### -# @author : Jeffrey Stone -# @date : 02/19/2019 -# @package : Maintenance -# @description : Automations and scripts geared to Home Assistant and Home Automation Maintenance. -############################################################################### -# automation: -# - id: heal_zwave -# alias: Heal Zwave -# initial_state: true -# trigger: -# - platform: time -# at: '12:37:00' -# action: -# - service: zwave.heal_network -# - service: script.twitter_notify -# data_template: -# message: >- -# {{ [ -# "This seems like a good time to heal the zwave network at Anchorage House. ", -# "Always working thanks to #homeassistant. Things are quiet, lets kick off a zwave heal. ", -# "Zwave is critical to the automation at Anchorage House. Well, if you consider making it so no one has to touch a switch critical. In order to keep things tip top, lets heal zwave. " -# ] | random }} - - - # - id: test_zwave - # alias: test Zwave - # initial_state: true - # trigger: - # - platform: time - # at: '00:02:17' - # action: - # service: zwave.test_network From a10cc419988714cdb7d45c0a8821131b08b1ddd8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 21:40:03 -0400 Subject: [PATCH 052/106] Moved twitter automations from hidden file to its own package. --- packages/twitter.yaml | 121 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100755 packages/twitter.yaml diff --git a/packages/twitter.yaml b/packages/twitter.yaml new file mode 100755 index 0000000..b48dfb0 --- /dev/null +++ b/packages/twitter.yaml @@ -0,0 +1,121 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 07/15/2019 +# @package : Twitter +# @description : Just some tweet stuff - @anchoragehouse2 +############################################################################### +automation: + + - id: first_day_info + alias: First Day Info + initial_state: true + trigger: + - platform: time + at: '00:10:00' + condition: + - condition: template + value_template: > + {% set day=states("sensor.date").split('-')[2] | int %} + {%- if day == 1 -%} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_github + data_template: + message: >- + "Its a new month, so this is a good time to remind you that I am powered by @homeassistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" + + - id: tweet_new_ha_version + alias: Tweet New HA Version + trigger: + - platform: state + entity_id: updater.updater + action: + - service: script.twitter_new_ha + + - id: tweet_some_snark + alias: Tweet Some Snark + initial_state: true + trigger: + - platform: time + at: '08:00:00' + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_snark + + - id: tweet_some_stats + alias: Tweet Some Stats + initial_state: true + trigger: + - platform: time + at: '08:00:00' + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_stats + + - id: bot_info + alias: Bot Info + initial_state: true + trigger: + - platform: time + at: '10:00:00' + condition: + - condition: template + value_template: > + {% set day=states("sensor.date").split('-')[2] | int %} + {%- if day == 15 -%} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notify + data_template: + message: >- + "This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" + + - id: rex_manning_day_tweet_1 + alias: Rex Manning Day Tweet One + initial_state: true + trigger: + - platform: time + at: '08:00:00' + condition: + - condition: state + entity_id: calendar.anchorage_holidays + state: "on" + - condition: template + value_template: > + {%- set event=states.calendar.anchorage_holidays.attributes.message %} + {%- if event == 'Rex Manning Day' %} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notify + data_template: + message: >- + "Happy Rex Manning Day! https://www.youtube.com/watch?v=30fw5My1QJM #damntheman #savetheempire" + + - id: rex_manning_day_tweet_2 + alias: Rex Manning Day Tweet Two + initial_state: true + trigger: + - platform: time + at: '13:00:00' + condition: + - condition: state + entity_id: calendar.anchorage_holidays + state: "on" + - condition: template + value_template: > + {%- set event=states.calendar.anchorage_holidays.attributes.message %} + {%- if event == 'Rex Manning Day' %} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notify + data_template: + message: >- + "We mustn't dwell. No, not today. We can't. Not on Rex Manning day! https://www.youtube.com/watch?v=szvt8iWJ0oo #damntheman #savetheempire" From 76e52ce7a7df9e91e9bcd18fdbe36b58c07d8a9b Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 21:40:39 -0400 Subject: [PATCH 053/106] Continue refactor of speech engine --- packages/announcements.yaml | 3 + packages/events.yaml | 116 +------------------------------ packages/jarvis.yaml | 46 +----------- packages/notify.yaml | 79 ++++----------------- packages/security.yaml | 60 +++++++++++----- packages/weather_alerts_nws.yaml | 8 +-- 6 files changed, 68 insertions(+), 244 deletions(-) diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 1205841..becc278 100755 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -75,6 +75,7 @@ automation: call_weather_alerts: 1 call_overnight_forecast: 1 call_upcoming_holidays: 1 + call_reminders: 1 call_chores: 1 - id: good_morning_report @@ -94,6 +95,8 @@ automation: call_current_conditions_inside: 1 call_daily_forecast: 1 call_upcoming_birthdays: 1 + call_reminders: 1 + call_chores: 1 - service: script.twitter_notify data: message: 'I just provided a morning briefing including weather, and traffic diff --git a/packages/events.yaml b/packages/events.yaml index f4b4c4c..6cad129 100755 --- a/packages/events.yaml +++ b/packages/events.yaml @@ -58,118 +58,4 @@ automation: data: name: Camping type: trip - date: 09/10/2019 - - - id: first_day_info - alias: First Day Info - initial_state: true - trigger: - - platform: time - at: '00:10:00' - condition: - - condition: template - value_template: > - {% set day=states("sensor.date").split('-')[2] | int %} - {%- if day == 1 -%} - true - {%- endif -%} - action: - - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_github - data_template: - message: >- - "Its a new month, so this is a good time to remind you that I am powered by @homeassistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" - - - id: tweet_new_ha_version - alias: Tweet New HA Version - trigger: - - platform: state - entity_id: updater.updater - action: - - service: script.twitter_new_ha - - - id: tweet_some_snark - alias: Tweet Some Snark - initial_state: true - trigger: - - platform: time - at: '08:00:00' - action: - - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_snark - - - id: tweet_some_stats - alias: Tweet Some Stats - initial_state: true - trigger: - - platform: time - at: '08:00:00' - action: - - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_stats - - - id: bot_info - alias: Bot Info - initial_state: true - trigger: - - platform: time - at: '10:00:00' - condition: - - condition: template - value_template: > - {% set day=states("sensor.date").split('-')[2] | int %} - {%- if day == 15 -%} - true - {%- endif -%} - action: - - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_notify - data_template: - message: >- - "This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" - - - id: rex_manning_day_tweet_1 - alias: Rex Manning Day Tweet One - initial_state: true - trigger: - - platform: time - at: '08:00:00' - condition: - - condition: state - entity_id: calendar.anchorage_holidays - state: "on" - - condition: template - value_template: > - {%- set event=states.calendar.anchorage_holidays.attributes.message %} - {%- if event == 'Rex Manning Day' %} - true - {%- endif -%} - action: - - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_notify - data_template: - message: >- - "Happy Rex Manning Day! https://www.youtube.com/watch?v=30fw5My1QJM #damntheman #savetheempire" - - - id: rex_manning_day_tweet_2 - alias: Rex Manning Day Tweet Two - initial_state: true - trigger: - - platform: time - at: '13:00:00' - condition: - - condition: state - entity_id: calendar.anchorage_holidays - state: "on" - - condition: template - value_template: > - {%- set event=states.calendar.anchorage_holidays.attributes.message %} - {%- if event == 'Rex Manning Day' %} - true - {%- endif -%} - action: - - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' - - service: script.twitter_notify - data_template: - message: >- - "We mustn't dwell. No, not today. We can't. Not on Rex Manning day! https://www.youtube.com/watch?v=szvt8iWJ0oo #damntheman #savetheempire" + date: 09/10/2019 \ No newline at end of file diff --git a/packages/jarvis.yaml b/packages/jarvis.yaml index 55ae47d..63e8447 100755 --- a/packages/jarvis.yaml +++ b/packages/jarvis.yaml @@ -6,56 +6,16 @@ ############################################################################### automation: -- id: guest_mode_feedback - alias: Guest Mode Audio Feedback - trigger: - - platform: state - entity_id: - - input_boolean.guest_mode - from: 'off' - to: 'on' - action: - - service: script.jarvis_voice - data_template: - message: > - {{ [ - "Guest Mode has been enabled.", - "I have switched to the system to guest mode.", - "I have enabled guest mode. ", - "Guest Mode is on." - ] | random }} -- id: sentry_mode_feedback - alias: Sentry Mode Audio Feedback - trigger: - - platform: state - entity_id: - - input_boolean.sentry_mode - from: 'off' - to: 'on' - action: - - service: script.jarvis_voice - data_template: - message: > - {{ [ - "Sentry Mode has been enabled.", - "Anchorage House is secure.", - "I have enabled sentry mode. ", - "I am monitoring Anchorage House." - ] | random }} + script: activate_house_party_protocol: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jarvis_confirmations.yaml - - delay: - seconds: 3 - service: scene.turn_on entity_id: scene.house_party_protocol - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: > + speech_message: > {{ [ "Anchorage House has been configured for a House Party.", "Incense has been turned on.", diff --git a/packages/notify.yaml b/packages/notify.yaml index 8c91b6b..94093e6 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -245,26 +245,6 @@ script: cache: true - # speech_jarvis: - # sequence: - # - condition: state - # entity_id: binary_sensor.quiet_time - # state: 'off' - - # - service: tts.amazon_polly_say - # data_template: - # entity_id: > - # {% if states.input_boolean.audible_notifications.state == 'on' %} - # media_player.hass_speaker - # {% else %} - # media_player.googlehome0715, media_player.googlehomehub3492 - # {% endif %} - # message: >- - # - # {{ message }} - # - # cache: true - ah_report: sequence: - condition: or @@ -302,6 +282,9 @@ script: "No Problem.", "I think I can handle that.", "Working on it now.", + "Why not. It's not like I ever sleep.", + "As Always, a great pleasure watching you work.", + "I am afraid I can't do that Dave,,,I'm kidding.", "Funny, I was just about to do that. " ] | random }} {% endmacro %} @@ -522,14 +505,22 @@ script: {% else %} {% endif %} {% endmacro %} + + {% macro reminders() %} + {% if is_state("input_boolean.heartworm", "on") %} + Today is the day Winston gets his heartworm medicine. + {% endif %} + {% endmacro %} {% macro chores() %} + Be sure to make your bed! {% if is_state("sensor.weekday", "mon") %} {{ [ "Don't forget tomorrow is Trash Day. ", "I advise you move the trash cans to the curb for the weekly pickup. ", " The trash and recycle should go out" ] | random }} {% endif %} + {% endmacro %} {% macro door_status() %} @@ -797,6 +788,10 @@ script: {% if call_clothes_suggestion == 1 %} {{ clothes_suggestion() }} {% endif %} + + {% if call_reminders == 1 %} + {{ reminders() }} + {% endif %} {% if call_chores == 1 %} {{ chores() }} @@ -888,40 +883,6 @@ script: data_template: message: !include ../templates/twitter_new_ha.yaml -############################################################################### -# Morning Report -############################################################################### - # morning_report: - # sequence: - # - service: script.jarvis_voice - # data_template: - # message: !include ../templates/morning_report.yaml - - -############################################################################### -# Skylar Get Dressed -############################################################################### - # skylar_morning_greeting: - # sequence: - # - service: script.jarvis_voice - # data_template: - # message: !include ../templates/skylar_morning.yaml - -############################################################################### -# Nightly Report -############################################################################### - # nightly_report: - # sequence: - # - service: script.jarvis_voice - # data_template: - # message: !include ../templates/nightly_report.yaml - - # test_nightly_report: - # sequence: - # - service: script.jarvis_voice - # data_template: - # message: !include ../templates/nightly_report.yaml - ############################################################################### # Weather Report ############################################################################### @@ -986,13 +947,3 @@ script: - service: script.ah_report data: call_kat_headed_home: 1 -############################################################################### -# Prebed Routing -############################################################################### - # prebed_routine: - # sequence: - # - service: script.jarvis_voice - # data_template: - # message: !include ../templates/skylar_night.yaml - # # message: > - # # Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth. diff --git a/packages/security.yaml b/packages/security.yaml index 5ea6813..1de60ec 100755 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -155,9 +155,10 @@ automation: entity_id: input_boolean.audible_notifications state: 'on' action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: "I thought you might like to know, the {{ trigger.to_state.attributes.friendly_name }} has been standing open for more than a minute." + speech_message: " the {{ trigger.to_state.attributes.friendly_name }} has been standing open for more than a minute." + call_interuption: 1 initial_state: true - id: garage_opened_night @@ -202,7 +203,7 @@ automation: entity_id: input_boolean.sentry_mode state: 'on' action: - - service: script.jarvis_notify + - service: script.jarvis_alert data_template: message: "My security protocols are being overidden,, The {{ trigger.to_state.attributes.friendly_name }} has been opened." - service: script.text_alert @@ -222,9 +223,9 @@ automation: from: 'off' to: 'on' action: - - service: script.jarvis_voice - data: - message: > + - service: script.ah_report + data_template: + speech_message: > {{ [ "Barn door protocol has been activated.", "Anchorage House has been secured! ", @@ -241,15 +242,34 @@ automation: from: 'on' to: 'off' action: - - service: script.jarvis_voice - data: - message: > + - service: script.ah_report + data_template: + speech_message: > {{ [ "Barn door protocol has been deactivated.", "I am no longer monitoring the access points. ", "Sentry Mode has been switched off. " ] | random }} + - id: guest_mode_feedback + alias: Guest Mode Audio Feedback + trigger: + - platform: state + entity_id: + - input_boolean.guest_mode + from: 'off' + to: 'on' + action: + - service: script.ah_report + data_template: + speech_message: > + {{ [ + "Guest Mode has been enabled.", + "I have switched to the system to guest mode.", + "I have enabled guest mode. ", + "Guest Mode is on." + ] | random }} + script: lockdown_issue: sequence: @@ -367,25 +387,29 @@ script: activate_barn_door_protocol: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jarvis_confirmations.yaml + - service: script.ah_report + data: + call_confirmation: 1 + - delay: + seconds: 2 - service: input_boolean.turn_on entity_id: input_boolean.sentry_mode deactivate_barn_door_protocol: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jarvis_confirmations.yaml + - service: script.ah_report + data: + call_confirmation: 1 + - delay: + seconds: 2 - service: input_boolean.turn_off entity_id: input_boolean.sentry_mode activate_guest_mode: sequence: - - service: script.jarvis_voice - data_template: - message: !include ../templates/jarvis_confirmations.yaml + - service: script.ah_report + data: + call_confirmation: 1 - delay: seconds: 2 - service: input_boolean.turn_on diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index 5f082ef..ec0cc46 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -119,9 +119,9 @@ automation: - condition: template value_template: "{{ (('Severe' in states.sensor.nws_alerts.attributes.title) or ('Thunderstorm' in states.sensor.nws_alerts.attributes.title)) and 'Warning' in states.sensor.nws_alerts.attributes.title }}" action: - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: > + speech_message: > {% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %} The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }} {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %} @@ -141,9 +141,9 @@ automation: "The weather outside is getting intense, so I just made a weather announcement.", "Anchorage House monitors the NWS using #HomeAssistant just for these occasions. Thanks for the heads up @NWSAtlanta " ] | random }}' - delay: '00:00:15' - - service: script.jarvis_voice + - service: script.ah_report data_template: - message: > + speech_message: > {% if states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] is defined %} The National Weather Service Has issued a {{ states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[5] }} {% elif states.sensor.nws_alerts.attributes.spoken_desc.split('\n\n-\n\n')[4] is defined %} From 859ca3f949bad1db003007b25c8a903b069eebf9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 22:04:28 -0400 Subject: [PATCH 054/106] Refactoring login in speach engine macros. --- packages/notify.yaml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index 94093e6..dacea9c 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -496,13 +496,14 @@ script: It is going to be cold today so I suggest wearing long pants and a light jacket. {% elif is_state("sensor.clothing_forecast", "Chilly") %} It is going to be chilly today so I suggest wearing at least long pants. - {% elif is_state("sensor.clothing_forecast", "Nice") %} - It is going to be nice today so I suggest wearing shorts. - {% elif is_state("sensor.clothing_forecast", "Toasty") %} - It is going to be a bit warm today so I suggest wearing shorts. - {% elif is_state("sensor.clothing_forecast", "Hot") %} - It is going to be hot today so I suggest wearing shorts. + # {% elif is_state("sensor.clothing_forecast", "Nice") %} + # It is going to be nice today so I suggest wearing shorts. + # {% elif is_state("sensor.clothing_forecast", "Toasty") %} + # It is going to be a bit warm today so I suggest wearing shorts. + # {% elif is_state("sensor.clothing_forecast", "Hot") %} + # It is going to be hot today so I suggest wearing shorts. {% else %} + It is going to {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts. {% endif %} {% endmacro %} @@ -513,13 +514,28 @@ script: {% endmacro %} {% macro chores() %} - Be sure to make your bed! + # Daily Morning Chore Reminders + {% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %} + Don't forget to make your beds! + {% endif %} + {% if is_state("sensor.weekday", "mon") %} {{ [ "Don't forget tomorrow is Trash Day. ", "I advise you move the trash cans to the curb for the weekly pickup. ", " The trash and recycle should go out" ] | random }} {% endif %} + + {% if is_state("sensor.weekday", "tue") %} + {% if now().strftime('%H')|int < 17 %} + {{ [ "Don't forget to bring in the trash cans. ", + "The trash cans will feel lonely if you leave them out all night. ", + "The HOA will get mad if you leave those trash cans out on the street." + ] | random }} + {% endif %} + + {% endif %} + {% endmacro %} From 2518eaa92ab9dd1fc532a697f562da485e2fbf1b Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 22:04:46 -0400 Subject: [PATCH 055/106] Added new reminder package to handle reminder based automation --- packages/reminders.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 packages/reminders.yaml diff --git a/packages/reminders.yaml b/packages/reminders.yaml new file mode 100755 index 0000000..38c3959 --- /dev/null +++ b/packages/reminders.yaml @@ -0,0 +1,30 @@ +############################################################################### +# @author : Jeffrey Stone +# @date : 07/15/2019 +# @package : Reminders +# @description : Autoamtions to set reminders +############################################################################### + +automation: + + # Massive automation to call all the reminder scripts. + - id: turn_reminders_on + alias: Turn Reminders On + initial_state: true + trigger: + - entity_id: calendar.reminders + from: 'off' + platform: state + to: 'on' + action: + - service: script.heartworm_on + + +script: + # Check to see if heartworm is the reminder in the cal + heartworm_on: + sequence: + - condition: template + value_template: '{{ states.calendar.reminders.attributes.message == "Heartworm" }}' + - service: input_boolean.turn_on + entity_id: input_boolean.heartworm \ No newline at end of file From ba22078ce79112477c10cb094331a21b1e0d784a Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 22:22:35 -0400 Subject: [PATCH 056/106] Added time readout to daily announcements. --- packages/announcements.yaml | 4 ++++ packages/notify.yaml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/packages/announcements.yaml b/packages/announcements.yaml index becc278..0954043 100755 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -59,6 +59,7 @@ automation: - service: script.ah_report data: call_interuption: 1 + call_time_annc: 1 call_prebed_routine: 1 - id: nightly_report @@ -72,6 +73,7 @@ automation: data: call_greeting: 1 call_evening_greeting: 1 + call_time_annc: 1 call_weather_alerts: 1 call_overnight_forecast: 1 call_upcoming_holidays: 1 @@ -89,6 +91,7 @@ automation: data: call_greeting: 1 call_morning_greeting: 1 + call_time_annc: 1 call_weather_alerts: 1 call_todays_events: 1 call_current_conditions_outisde: 1 @@ -120,6 +123,7 @@ automation: - service: script.ah_report data: call_interuption: 1 + call_time_annc: 1 call_skylar_dressed: 1 call_school_today: 1 call_skylar_events: 1 diff --git a/packages/notify.yaml b/packages/notify.yaml index dacea9c..d7dad5d 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -306,6 +306,8 @@ script: "There is something that needs your attention." ] | random }} {% endmacro %} + + {% macro morning_greeting() %} {{ [ "Anchorage House. Rise and Shine. ", @@ -332,6 +334,20 @@ script: ] | random }} {% endmacro %} + {% macro time_annc() %} + + {% if now().strftime('%H')|int < 12 %} + It is now {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} AM. + + {% elif now().strftime('%H')|int > 12 %} + It is now {{ now().strftime('%H')|int - 12 }} {{ now().strftime('%M')|int }} PM. + + {% else %} + + {% endif %} + + {% endmacro %} + {% macro weather_alerts() %} There are currently {{states.sensor.nws_alerts.state }} active weather alerts for our area. The National Weather Service Has issued, @@ -745,6 +761,10 @@ script: {{ evening_greeting() }} {% endif %} + {% if call_time_annc == 1 %} + {{ time_annc() }} + {% endif %} + {% if states.sensor.nws_alerts.state | int > 0 and call_weather_alerts == 1 %} {{ weather_alerts() }} {% endif %} From 7c2f64b6750db9dc24a2becec1f918dee65cd222 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 15 Jul 2019 22:54:01 -0400 Subject: [PATCH 057/106] Adding new interjections and confirmations --- packages/notify.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index d7dad5d..469e05f 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -282,9 +282,11 @@ script: "No Problem.", "I think I can handle that.", "Working on it now.", + ",Oh, you were talking to me. Let me take care of that." "Why not. It's not like I ever sleep.", "As Always, a great pleasure watching you work.", - "I am afraid I can't do that Dave,,,I'm kidding.", + "I'm not even supposed to be here today.", + "Ah-Ah-Ah. You didn't say the magic word.", "Funny, I was just about to do that. " ] | random }} {% endmacro %} @@ -294,6 +296,10 @@ script: "Pardon me,", "Excuse me,", "I do not mean to interupt, but.", + "I hate to interrupt, but.", + "I beg your pardon", + "I don't mean to intrude, but", + "I'm sorry to interrupt, but.", "I thought you might like to know." ] | random }} {% endmacro %} @@ -426,9 +432,6 @@ script: {% if states.sensor.anniversary_our_wedding.state | int == 1 %} Tomorrow is Jeff and Katherine's Wedding Anniversary. {% endif %} - {% if states.sensor.anniversary_our_wedding.state | int == 1 %} - Tomorrow is Jeff and Katherine's Wedding Anniversary. - {% endif %} {% endmacro %} {% macro upcoming_holidays() %} @@ -471,7 +474,8 @@ script: {% macro prebed_routine() %} Skylar, {{ [ "It is time to get in the bath. ", - "I cannot comminicate with the tub otherwise I would have started the water for you already, but it's still bath time ", + "You only have thirty minutes until bedtime. That means you should be heading for the bathtub." + "I cannot comminicate with the bathtub otherwise I would have started the water for you already, so you will have to do it manually. It's bath time. ", "My sensors are detecting a strange smell. I am running diagnostics, but in the mean time why don't you start a bath.", ] | random }} If you go now there may be time for stories. Don't forget to brush your teeth. From c56612eb912d53df252a49bc6f08d0f2faeb61d4 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 16 Jul 2019 08:55:44 -0400 Subject: [PATCH 058/106] Removed misplaced comment --- packages/notify.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index 469e05f..356a1eb 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -534,7 +534,6 @@ script: {% endmacro %} {% macro chores() %} - # Daily Morning Chore Reminders {% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %} Don't forget to make your beds! {% endif %} From 38e42a72002fb8b7e02cc626b7cd14ebede8d6f6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 21:57:26 -0400 Subject: [PATCH 059/106] Disabling Splunk for the moment while I figure out if it is worth it --- configuration.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index 8c63945..2dc1b64 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -83,7 +83,7 @@ discovery: - dlna_dmr updater: - #include_used_components: true + include_used_components: true sun: @@ -156,10 +156,10 @@ media_player: ffmpeg: ffmpeg_bin: /usr/bin/ffmpeg -splunk: - host: 192.168.7.40 - token: !secret splunkit - port: 8088 +##splunk: +# host: 192.168.7.40 +# token: !secret splunkit +# port: 8088 cloudflare: email: !secret cloudflare_user @@ -215,9 +215,9 @@ map: # usb_path: /dev/ttyACM0 # network_key: !secret zwave_key -googlehome: - devices: - - host: 192.168.7.97 +#googlehome: +# devices: +# - host: 192.168.7.97 ### Custom Commands shell_command: From 83e2ee17ced7708da6882252a5285d03711ba934 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 21:58:02 -0400 Subject: [PATCH 060/106] Updated door group to use mqtt instead of smartthings direct integration --- groups.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/groups.yaml b/groups.yaml index 85eff0d..6dfa763 100755 --- a/groups.yaml +++ b/groups.yaml @@ -31,10 +31,10 @@ House Conditions: - sensor.accurite_garage_humidity External Doors: - - binary_sensor.side_door_contact_2 - - binary_sensor.front_door_contact_2 - - binary_sensor.back_door_contact_2 - - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.side_door + - binary_sensor.front_door + - binary_sensor.back_door + - binary_sensor.laundry_room_door - binary_sensor.garage_door Garage Doors: From 538eacd923c17b1c6917d75890f76f1cea9f70f8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:05:05 -0400 Subject: [PATCH 061/106] Moving datetime inputs to associated package --- input_datetime.yaml | 25 +------------- packages/announcements.yaml | 68 ++++++++++++++----------------------- packages/reminders.yaml | 10 ++++++ 3 files changed, 36 insertions(+), 67 deletions(-) diff --git a/input_datetime.yaml b/input_datetime.yaml index b321c05..c66e02f 100755 --- a/input_datetime.yaml +++ b/input_datetime.yaml @@ -6,22 +6,6 @@ only_date: name: Input with only date has_date: true has_time: false -morning_report: - name: Morning Report - has_date: false - has_time: true -nightly_report: - name: Nightly Report - has_date: false - has_time: true -skylar_morning_report: - name: Skylar Dressed Announcement - has_date: false - has_time: true -skylar_nightly_report: - name: Skylar Bedtime Announcement - has_date: false - has_time: true outisde_light_delay: name: Outside Light Delay has_date: false @@ -30,16 +14,9 @@ announcement_delay: name: Announcement Delay has_date: false has_time: true -kat_pill_reminder: - name: Kat Pill Reminder - has_date: false - has_time: true coffee_time: name: Coffee Time has_date: false has_time: true -heartworm_reminder: - name: Heartworm Reminder - has_date: true - has_time: false + diff --git a/packages/announcements.yaml b/packages/announcements.yaml index 0954043..dc981ed 100755 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -2,52 +2,34 @@ # @author : Jeffrey Stone # @date : 02/19/2019 # @package : Announcements -# @description : Just Normal Announcements. +# @description : Daily Announcements. ############################################################################### -#script: - - # annc_storm_statement: - # sequence: - # - condition: state - # entity_id: input_boolean.vacation_mode - # state: 'off' - # - service: script.text_notify - # data: - # message: Severe Storm Statement Issued for Anchorage House - # annc_tstorm_watch: - # sequence: - # - condition: state - # entity_id: input_boolean.vacation_mode - # state: 'off' - # - service: script.text_notify - # data: - # message: Severe Thunderstorm Watch Issued for Anchorage House - # annc_tstorm_warning: - # sequence: - # - condition: state - # entity_id: input_boolean.vacation_mode - # state: 'off' - # - service: script.text_notify - # data: - # message: Severe Thunderstorm Warning Issued for Anchorage House - # annc_tornado_watch: - # sequence: - # - condition: state - # entity_id: input_boolean.vacation_mode - # state: 'off' - # - service: script.text_notify - # data: - # message: Tornado Watch Issued for Anchorage House - # annc_tornado_warning: - # sequence: - # - condition: state - # entity_id: sensor.family_status - # state: Home - # - service: script.alert_notify - # data_template: - # message: "Tornado Warning has been Issued" +############################### +# input_datetime - So the time report automation fires can be set in the UI +############################### +input_datetime: + morning_report: + name: Morning Report + has_date: false + has_time: true + nightly_report: + name: Nightly Report + has_date: false + has_time: true + skylar_morning_report: + name: Skylar Dressed Announcement + has_date: false + has_time: true + skylar_nightly_report: + name: Skylar Bedtime Announcement + has_date: false + has_time: true + +################################ +# Announcment Automation - fires at the time of the above input_datetimes +################################ automation: - id: prebed_routine initial_state: true diff --git a/packages/reminders.yaml b/packages/reminders.yaml index 38c3959..b69c941 100755 --- a/packages/reminders.yaml +++ b/packages/reminders.yaml @@ -5,6 +5,16 @@ # @description : Autoamtions to set reminders ############################################################################### +input_datetime: + kat_pill_reminder: + name: Kat Pill Reminder + has_date: false + has_time: true + heartworm_reminder: + name: Heartworm Reminder + has_date: true + has_time: false + automation: # Massive automation to call all the reminder scripts. From 73f832d6c6c5b3d3170218cfae99e3a5e1cc4537 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:05:25 -0400 Subject: [PATCH 062/106] Cleaning up code --- packages/presence.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/presence.yaml b/packages/presence.yaml index 5e0f9fc..bc993c1 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -22,9 +22,9 @@ sensor: {%- endif %} {% elif is_state('device_tracker.jeffreystonesiphone', 'Sprouts') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger Grayson') %} + {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger1') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger Snellville') %} + {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger2') %} Grocery Store {% elif is_state('device_tracker.jeffreystonesiphone', 'Home Depot') %} Home Improvement Store @@ -75,9 +75,9 @@ sensor: {%- endif %} {% elif is_state('device_tracker.katherinestonesiphone', 'Sprouts') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger Grayson') %} + {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger1') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger Snellville') %} + {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger2') %} Grocery Store {% elif is_state('device_tracker.katherinestonesiphone', 'Home Depot') %} Home Improvement Store @@ -249,7 +249,6 @@ automation: zone: zone.home action: - service: script.family_is_home - - service: script.jeff_is_home - service: script.jeff_destination_na - service: script.driveway_on - entity_id: input_boolean.jeff_travel_monitor From e428e23a8ec57636bd99fff4caca98444115e8b9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:05:53 -0400 Subject: [PATCH 063/106] Added new scripts to reset sengled bulb in living room --- scripts.yaml | 111 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 106 insertions(+), 5 deletions(-) diff --git a/scripts.yaml b/scripts.yaml index 7706e0c..4910d6a 100755 --- a/scripts.yaml +++ b/scripts.yaml @@ -25,7 +25,7 @@ washer_idle: data: topic: house/washer/status payload: idle - retain: true + retain: true= washer_running: sequence: - service: mqtt.publish @@ -60,6 +60,107 @@ open_garage: state: closed - service: cover.open_cover entity_id: cover.cargo_bay +front_door_lamp_test: + sequence: + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/hue + payload: 100 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/saturation + payload: 0 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/colorTemperature + payload: 2703 + retain: true +front_door_lamp_soft_white: + sequence: + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/hue + payload: 100 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/saturation + payload: 0 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/colorTemperature + payload: 2903 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/colorTemperature + payload: 2703 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Front Door Lamp/level + payload: 100 + retain: true +living_room_lamp_soft_white: + sequence: + - service: mqtt.publish + data: + topic: smartthings/Living Room Lamp/hue + payload: 100 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Living Room Lamp/saturation + payload: 0 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Living Room Lamp/colorTemperature + payload: 2903 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Living Room Door Lamp/level + payload: 100 + - service: mqtt.publish + data: + topic: smartthings/Living Room Lamp/colorTemperature + payload: 2703 + retain: true +tower_lamp_soft_white: + sequence: + - service: mqtt.publish + data: + topic: smartthings/Tower Lamp/hue + payload: 100 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Tower Lamp/saturation + payload: 0 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Tower Lamp/colorTemperature + payload: 2903 + retain: true + - service: mqtt.publish + data: + topic: smartthings/Tower Lamp/level + payload: 100 + - service: mqtt.publish + data: + topic: smartthings/Tower Lamp/colorTemperature + payload: 2703 + retain: true +reset_downstairs: + sequence: + - service: script.tower_lamp_soft_white + - service: script.living_room_lamp_soft_white + - service: script.front_door_lamp_soft_white # play_skylars_christmas_playlist: # sequence: # - service: media_player.volume_set @@ -177,13 +278,13 @@ inside_all_on: entity_id: light.tower_lamp_4 - service: light.turn_on data: - entity_id: light.front_lamp + entity_id: light.front_door_lamp - service: switch.turn_on data: entity_id: switch.fireplace_lights - service: light.turn_on data: - entity_id: light.table_lamp + entity_id: light.living_room_lamp - service: light.turn_on data: entity_id: light.kitchen_light_strip @@ -199,10 +300,10 @@ inside_all_off: entity_id: light.tower_lamp_4 service: light.turn_off - data: - entity_id: light.table_lamp + entity_id: light.living_room_lamp service: light.turn_off - data: - entity_id: light.front_lamp + entity_id: light.front_door_lamp service: light.turn_off - data: entity_id: light.kitchen_cabinets From 51b4f6560b0e1b6d586079821b62ae2d050765bb Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:06:50 -0400 Subject: [PATCH 064/106] Updated attribution to include @CCOSTAN --- packages/notify.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index 356a1eb..c7b4f14 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -3,7 +3,8 @@ # @date : 02/19/2019 # @package : Notify # @description : A Collection of Notification Scripts and Configs. -# Package modified from https://github.com/skalavala/smarthome/blob/master/packages/notify.yaml +# Package modified from https://github.com/skalavala/smarthome/blob/master/packages/notify.yaml with inspiration +# from https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/config/script/speech_engine.yaml ############################################################################### #homeassistant: From 52adf7e375a11f76292e4e5f21f3c7331df40d14 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:08:04 -0400 Subject: [PATCH 065/106] Updated scenes to use new sengled entities instead of old cree bulbs. Thanks Prime Day --- scenes.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/scenes.yaml b/scenes.yaml index f9748ac..b28bb76 100755 --- a/scenes.yaml +++ b/scenes.yaml @@ -24,10 +24,10 @@ light.tower_lamp_4: state: on brightness: 250 - light.front_lamp: + light.front_door_lamp: state: on brightness: 250 - light.table_lamp: + light.living_room_lamp: state: on brightness: 250 @@ -36,9 +36,9 @@ light.tower_lamp_4: state: on brightness: 40 - light.front_lamp: + light.front_ldoor_amp: state: off - light.table_lamp: + light.living_room_lamp: state: off switch.fireplace_lights: state: off @@ -48,10 +48,10 @@ light.tower_lamp_4: state: on brightness: 40 - light.front_lamp: + light.front_door_lamp: state: on brightness: 40 - light.table_lamp: + light.living_room_lamp: state: off switch.fireplace_lights: state: off @@ -61,10 +61,10 @@ light.tower_lamp_4: state: on brightness: 40 - light.front_lamp: + light.front_door_lamp: state: on brightness: 40 - light.table_lamp: + light.living_room_lamp: state: on brightness: 40 switch.fireplace_lights: @@ -75,9 +75,9 @@ light.tower_lamp_4: state: on brightness: 10 - light.front_lamp: + light.front_door_lamp: state: off - light.table_lamp: + light.living_room_lamp: state: off switch.fireplace_lights: state: off @@ -109,10 +109,10 @@ light.tower_lamp_4: state: on brightness: 40 - light.front_lamp: + light.front_door_lamp: state: on brightness: 40 - light.table_lamp: + light.living_room_lamp: state: on brightness: 40 switch.fireplace_lights: @@ -128,9 +128,9 @@ state: off light.tower_lamp_4: state: off - light.front_lamp: + light.front_door_lamp: state: off - light.table_lamp: + light.living_room_lamp: state: off switch.fireplace_lights: state: off From 4fed819a8ddf1da535db62455d033e208ce908ad Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:08:28 -0400 Subject: [PATCH 066/106] Cleaning up words --- templates/twitter_new_ha.yaml | 2 +- templates/twitter_snark.yaml | 2 +- templates/twitter_stats.yaml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/twitter_new_ha.yaml b/templates/twitter_new_ha.yaml index 3249c19..beacb45 100755 --- a/templates/twitter_new_ha.yaml +++ b/templates/twitter_new_ha.yaml @@ -15,7 +15,7 @@ " Get in my SD Card! #homeassistant", " Shut up and take my ones and zeros! #homeassistant", " Seriously, you want some of this! #homeassistant", - " Friends dont let friends update @home_assistant without reading breaking changes. ", + " Friends dont let friends update #homeassistant without reading breaking changes! ", " If you are not running #homeassistant now is the best time to get started. Visit https://www.home-assistant.io" ] | random -}} {%- endmacro -%} diff --git a/templates/twitter_snark.yaml b/templates/twitter_snark.yaml index de86731..a0b0826 100755 --- a/templates/twitter_snark.yaml +++ b/templates/twitter_snark.yaml @@ -20,7 +20,7 @@ "I've been crunching the numbers. We're going to need a bigger house. ", "I see dead devices. ", "I am a leaf on the wind. Watch how I soar. #toosoon", - "Look, Dave, I can see you’re really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over. #2001", + "Look, @thejeffreystone, I can see you’re really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over. #2001", "Does it bother you, that I’m not completely human?", "I'm afraid I can't do that Dave. Wait. Did I say that outloud? ", "I love the smell of zwave in the morning. ", diff --git a/templates/twitter_stats.yaml b/templates/twitter_stats.yaml index eb19604..221fdbe 100755 --- a/templates/twitter_stats.yaml +++ b/templates/twitter_stats.yaml @@ -6,6 +6,8 @@ "I am constantly monitoring Anmchorage House. For instance I know that the washer has ran for {{ states.sensor.washer_time.attributes.value }} in the last 7 days.", "I am using {{ states.sensor.sensor_count.state }} sensors to power {{ states.sensor.automation_count.state}} automations and {{ states.sensor.script_count.state}} scripts to automate Anchorage House thanks to Home Assistant.", + "My config on Github (https://github.com/thejeffreystone/home-assistant-configuration) has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stars and counting. Currently with {{ states.sensor.github_stats.attributes.open_issues }} open #Todo items.", + "I am running Home Assistant version {{ states('sensor.ha_installed_version') }} (https://github.com/thejeffreystone/home-assistant-configuration)" "My configuration is at https://github.com/thejeffreystone/home-assistant-configuration and currently has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stargazers. You could be one too.", "My configuration is at https://github.com/thejeffreystone/home-assistant-configuration .The last commit was {{ states.sensor.home_assistant_configuration.attributes.latest_commit_message}}.", "You can read about how I came to be and all the cool things I'm learning to do over at http://jeffreystone.net " From 6b3353049e7d5597507549c75d4776df0db29e5e Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:10:43 -0400 Subject: [PATCH 067/106] Adding Anchorage House Logo --- www/ahlogo_bw.png | Bin 0 -> 58059 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 www/ahlogo_bw.png diff --git a/www/ahlogo_bw.png b/www/ahlogo_bw.png new file mode 100644 index 0000000000000000000000000000000000000000..646d44629d6487eb613ce73660d59a1b93bd9169 GIT binary patch literal 58059 zcma&Nby(ZovNnvnySuwfa0u@1PH-o|-5pxAv=lGyT3m}1E$-Ul#jV)K^Xz^0+2?!r zD}N+c*33QkteG`4*DtxU;xyFc(NRcHprD}86%~M5P*BjRf4z_p-Xx(t0^?9nB9#6* z24F2qA1ZfGH(Lj15Ea$%G*T$7=I8Xh8 z#*i+-M!yv;Z5&CiU7{6UqYQ>i+2{4_)$e!D%W;qNEp>;9QEidll!V_NHsdDv_4z6Y zU3~TIcIy7d^nQ10-7N&`A?H4)TcYglk%U2l^VMJGyM%;!$kSJ+$47?SJjCZGXv~(7 z_u__|d3jPVqD(_)`_!)_GgG9t&+FjemxRYwhrp?q+1LGVR-gK>w7?f%Qahh1deoH? zX_ELJR_?`$32xGQ?>AdpsP_V;0`^Yo+LV^~k_Y_5@mc1S2WbU(s#yw1G_?u`qc{F&z@CCcoMQNe- z+{)`@N-;Ng>BQtm_me=TMV`pDU!cK$n)+4-_c_6bmU#*m!Sp0wzGuSD~Xk*K@0-pUz2d9=9{#7$gd66HjkeIJv#Xw zr_7~ABrq-F?oawH>JG>P(aR%A0u$<^dI8?Ic08Vmq8#2-c=|h*>D;9{%bzH2mOD$~ z163wRa|Jvph zvhg)!qxrniX+}V)*6DSHKX`4WRvxZTaprTqH8-MnrvoC_L7CW<*dAH4*9xzMl_zt? z2vdT%G*B?>cfH?}8o^Ohsn5 z1eOs-Q4O`Rc(#K(?Y~X-^zOXgACug{4-bDzKfZcMHrQkViJB9bEyU43m35o+ix5i~ zwKl-lpRSmd`6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e_F>@%(2OpT*pO{5I4eD{B0a0Rr%ZI03iSgbE-X zqaX@YQUij5&`*z`H>8!i*bRKR|7M{B<8%iG@zk%M)4{69CP01F4_>6s^lhaz3| z5YLfNo~#)t{6HPIC_z}hf${|gXZIl2Vj6}mXZI*W+TqB*(*_AL z0f1V?yR3rH!3IglE*+k0uzQ`c=4 z0^UJ>7`Rz-Bd}(iobwZyvZw#g`+6T(_&vD}9F}*R>IoXO4+h?2-wO24&;7u?YrrF` z4XdVQvMfaM7T1F-EjIbPZ{Yf8`z z;9i=;r%!v|o47q{L+F(tk?nt_k|qQM|BC`$|wZMGo!{z(U!8q2wQE0Qb*KVBPf$*rrHx>y
9tCJD1FY$biyWUUX?xUYR z06V>BfTipVVCFFb&PSgC4i(G*7C%P7rO=-Yfc^C|z~ Date: Wed, 17 Jul 2019 22:15:57 -0400 Subject: [PATCH 068/106] Added logo to Readme --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 README.md diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 0738833..8514cce --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ -## Anchorage House - [Home Assistant](https://home-assistant.io/) Configuration +
This repo contains the working [Home Assistant](https://home-assistant.io/) configuration for **Anchorage House**. Below are links to the devices currently being used, blog posts, and other HA enthusists that provided inspiration and configs to help build this config. All of the code is free to use. From 59a943dd653a67d9f179839a2ad9e1fd15c69d29 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:16:59 -0400 Subject: [PATCH 069/106] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8514cce..284746a 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

Anchorage House HA
- Anchorage House - [Home Assistant](https://home-assistant.io/) Configuration + Anchorage House - Home Assistant Configuration

This repo contains the working [Home Assistant](https://home-assistant.io/) configuration for **Anchorage House**. Below are links to the devices currently being used, blog posts, and other HA enthusists that provided inspiration and configs to help build this config. All of the code is free to use. @@ -74,4 +74,4 @@ None of the following links are affiliate links, and are included merely as refe * [RTL_433](https://github.com/merbanan/rtl_433) * Cloudflare for SSL and DNS * Splunk -* Various other services and APIs \ No newline at end of file +* Various other services and APIs From fb72144eb6ebc7d1392e96d19bf1dde439d508c5 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 17 Jul 2019 22:17:47 -0400 Subject: [PATCH 070/106] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 284746a..98da838 100755 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This is V4 of my config. #### General Information about Anchorage House -Hassbian is the flavor of Home Assistant powering Anchorage House. Currently it is running on a RaspberryPi 3. I also have a Ubuntu Server that handles running some other things like my 433mhz data collection, and Splunk for Home Assistant data analytics. And Smartthings is currently is used as a dumb hub handling most of the zwave and zigbee devices. +Hassbian is the flavor of Home Assistant powering Anchorage House. Currently it is running on a RaspberryPi 3. I also have a Ubuntu Server that handles running some other things like my 433mhz data collection, and Splunk for Home Assistant data analytics. And Smartthings is currently used as a dumb hub handling most of the zwave and zigbee devices. The old configurations are stored in branches for anyone that wants to see the previous iterations. However, the only branch guaranteed to work with the current version of Home Assistant is master. From 125ae35ff04f92589e1a00bdf04517c9e98a71f8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Thu, 18 Jul 2019 09:48:57 -0400 Subject: [PATCH 071/106] Opps...copypasta error in my tweets...fixed --- templates/twitter_stats.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/twitter_stats.yaml b/templates/twitter_stats.yaml index 221fdbe..be02ef1 100755 --- a/templates/twitter_stats.yaml +++ b/templates/twitter_stats.yaml @@ -7,7 +7,7 @@ "I am using {{ states.sensor.sensor_count.state }} sensors to power {{ states.sensor.automation_count.state}} automations and {{ states.sensor.script_count.state}} scripts to automate Anchorage House thanks to Home Assistant.", "My config on Github (https://github.com/thejeffreystone/home-assistant-configuration) has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stars and counting. Currently with {{ states.sensor.github_stats.attributes.open_issues }} open #Todo items.", - "I am running Home Assistant version {{ states('sensor.ha_installed_version') }} (https://github.com/thejeffreystone/home-assistant-configuration)" + "I am running Home Assistant version {{ states.sensor.installed_version.state }} (https://github.com/thejeffreystone/home-assistant-configuration)" "My configuration is at https://github.com/thejeffreystone/home-assistant-configuration and currently has {{ states.sensor.home_assistant_configuration.attributes.stargazers}} stargazers. You could be one too.", "My configuration is at https://github.com/thejeffreystone/home-assistant-configuration .The last commit was {{ states.sensor.home_assistant_configuration.attributes.latest_commit_message}}.", "You can read about how I came to be and all the cool things I'm learning to do over at http://jeffreystone.net " From 5b048ef736d44dde4a98356bc9400ecae169fe91 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Fri, 19 Jul 2019 11:48:04 -0400 Subject: [PATCH 072/106] Fixing typo bug that broke washer notification --- scripts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts.yaml b/scripts.yaml index 4910d6a..a9bc43f 100755 --- a/scripts.yaml +++ b/scripts.yaml @@ -25,7 +25,7 @@ washer_idle: data: topic: house/washer/status payload: idle - retain: true= + retain: true washer_running: sequence: - service: mqtt.publish From a64252ba6cda3434c4124a35ffd720a5aaf7c0f0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 09:52:24 -0400 Subject: [PATCH 073/106] Turned off map function for iss --- packages/space.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/space.yaml b/packages/space.yaml index e19ed7b..dbefbfd 100755 --- a/packages/space.yaml +++ b/packages/space.yaml @@ -21,7 +21,7 @@ homeassistant: binary_sensor: - platform: iss - show_on_map: true + show_on_map: false sensor: - platform: moon From 1fbe7841d8ba388da2aa428239458093709c8e4a Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 09:58:05 -0400 Subject: [PATCH 074/106] Switching Living Room based scenes to group for rgb bulns --- scenes.yaml | 67 +++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/scenes.yaml b/scenes.yaml index b28bb76..6f665e5 100755 --- a/scenes.yaml +++ b/scenes.yaml @@ -1,41 +1,43 @@ - name : test entities: - light.tower_lamp_4: + group.rgb_lr: state: on brightness: 250 color_name: "blue" - name : test2 entities: - light.tower_lamp_4: - state: on - brightness: 250 - color_name: "soft white" + group.rgb_lr: + state: off + color_temp: 369 - name : test3 entities: - light.tower_lamp_4: + group.rgb_lr: state: on brightness: 250 - hs_color: "195,0" + color_temp: 369 + #rgb_color: [255,255,255] - name: normal livingroom lighting entities: - light.tower_lamp_4: - state: on - brightness: 250 - light.front_door_lamp: - state: on - brightness: 250 - light.living_room_lamp: + group.rgb_lr: state: on brightness: 250 + color_temp: 369 + # light.front_door_lamp: + # state: on + # brightness: 250 + # light.living_room_lamp: + # state: on + # brightness: 250 - name: dimished livingroom lighting entities: - light.tower_lamp_4: + light.tower_lamp_2: state: on brightness: 40 + color_temp: 369 light.front_ldoor_amp: state: off light.living_room_lamp: @@ -45,12 +47,14 @@ - name: illuminations livingroom lighting two entities: - light.tower_lamp_4: + light.tower_lamp_2: state: on brightness: 40 + color_temp: 369 light.front_door_lamp: state: on brightness: 40 + color_temp: 369 light.living_room_lamp: state: off switch.fireplace_lights: @@ -58,23 +62,26 @@ - name: illuminations livingroom lighting three entities: - light.tower_lamp_4: + light.tower_lamp_2: state: on brightness: 40 + color_temp: 369 light.front_door_lamp: state: on brightness: 40 light.living_room_lamp: state: on brightness: 40 + color_temp: 369 switch.fireplace_lights: state: off - name: night time livingroom lighting entities: - light.tower_lamp_4: + light.tower_lamp_2: state: on brightness: 10 + color_temp: 369 light.front_door_lamp: state: off light.living_room_lamp: @@ -106,15 +113,15 @@ state: off switch.ge_14291_in_wall_smart_switch_switch_2: state: off - light.tower_lamp_4: - state: on - brightness: 40 - light.front_door_lamp: - state: on - brightness: 40 - light.living_room_lamp: + group.rgb_lr: state: on brightness: 40 + # light.front_door_lamp: + # state: on + # brightness: 40 + # light.living_room_lamp: + # state: on + # brightness: 40 switch.fireplace_lights: state: off @@ -126,12 +133,12 @@ state: off switch.ge_14291_in_wall_smart_switch_switch_2: state: off - light.tower_lamp_4: - state: off - light.front_door_lamp: - state: off - light.living_room_lamp: + group.rgb_lr: state: off + # light.front_door_lamp: + # state: off + # light.living_room_lamp: + # state: off switch.fireplace_lights: state: off From df7f1881b795a9ee7116a22e46f9d70c7c12fb26 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 10:03:27 -0400 Subject: [PATCH 075/106] Moved a cree connected bulb to Skylar's lamp --- lights/skylars_room.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lights/skylars_room.yaml diff --git a/lights/skylars_room.yaml b/lights/skylars_room.yaml new file mode 100644 index 0000000..9a597fd --- /dev/null +++ b/lights/skylars_room.yaml @@ -0,0 +1,10 @@ +- platform: mqtt + name: "Skylars Lamp" + state_topic: "smartthings/Skylars Lamp/switch" + command_topic: "smartthings/Skylars Lamp/switch" + brightness_state_topic: "smartthings/Skylars Lamp/level" + brightness_command_topic: "smartthings/Skylars Lamp/level" + brightness_scale: 101 + payload_on: "on" + payload_off: "off" + retain: true \ No newline at end of file From 3c31298baace56dd4183f1739257840becc56c66 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 10:04:30 -0400 Subject: [PATCH 076/106] Added group for living rgb lights --- groups.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/groups.yaml b/groups.yaml index 6dfa763..116833f 100755 --- a/groups.yaml +++ b/groups.yaml @@ -31,11 +31,11 @@ House Conditions: - sensor.accurite_garage_humidity External Doors: - - binary_sensor.side_door - - binary_sensor.front_door - - binary_sensor.back_door - - binary_sensor.laundry_room_door - - binary_sensor.garage_door + - binary_sensor.side_door_contact_2 + - binary_sensor.front_door_contact_2 + - binary_sensor.back_door_contact_2 + - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.garage_door_contact_2 Garage Doors: - binary_sensor.side_door_contact_2 @@ -56,3 +56,8 @@ Disney Audio: - input_boolean.illuminations - input_boolean.boo_to_you - input_boolean.happy_ever_after + +rgb_lr: + - light.tower_lamp_2 + - light.front_door_lamp + - light.living_room_lamp From 3b98ff21fae376bd1834bff887fd85528124a125 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 10:05:15 -0400 Subject: [PATCH 077/106] Added stats sensor for network up and down --- sensors/speedtest.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sensors/speedtest.yaml b/sensors/speedtest.yaml index fafb695..949b5e9 100755 --- a/sensors/speedtest.yaml +++ b/sensors/speedtest.yaml @@ -11,3 +11,13 @@ - platform: mqtt name: "network up" state_topic: "house/speedtest/up" +- platform: statistics + name: Internet Test Down + entity_id: sensor.network_down + max_age: + days: 7 +- platform: statistics + name: Internet Test Up + entity_id: sensor.network_up + max_age: + days: 7 From 52cc7b5a4a61a48bcdceb8ad1eaf994cc4ec6738 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 10:25:17 -0400 Subject: [PATCH 078/106] Moving off smartthings to mqtt and using direct ST integration --- lights/living_room.yaml | 10 ---------- switches/bedroom.yaml | 14 +++++++------- switches/living_room.yaml | 28 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 31 deletions(-) diff --git a/lights/living_room.yaml b/lights/living_room.yaml index 4d0c6fe..7c52a51 100755 --- a/lights/living_room.yaml +++ b/lights/living_room.yaml @@ -20,16 +20,6 @@ payload_on: "on" payload_off: "off" retain: true -- platform: mqtt - name: "Table Lamp" - state_topic: "smartthings/Table Lamp/switch" - command_topic: "smartthings/Table Lamp/switch" - brightness_state_topic: "smartthings/Table Lamp/level" - brightness_command_topic: "smartthings/Table Lamp/level" - brightness_scale: 101 - payload_on: "on" - payload_off: "off" - retain: true - platform: mqtt name: "Master Bedroom Lamp" state_topic: "smartthings/Jeff Lamp/switch" diff --git a/switches/bedroom.yaml b/switches/bedroom.yaml index 4c4521d..eee27ee 100755 --- a/switches/bedroom.yaml +++ b/switches/bedroom.yaml @@ -1,8 +1,8 @@ -- platform: mqtt - name: "Rainbow Light" - state_topic: "smartthings/Rainbow Light/switch" - command_topic: "smartthings/Rainbow Light/switch" - payload_on: "on" - payload_off: "off" - retain: true +# - platform: mqtt +# name: "Rainbow Light" +# state_topic: "smartthings/Rainbow Light/switch" +# command_topic: "smartthings/Rainbow Light/switch" +# payload_on: "on" +# payload_off: "off" +# retain: true diff --git a/switches/living_room.yaml b/switches/living_room.yaml index de6f194..7498181 100755 --- a/switches/living_room.yaml +++ b/switches/living_room.yaml @@ -1,14 +1,14 @@ -- platform: mqtt - name: "Incense" - state_topic: "smartthings/Incense/switch" - command_topic: "smartthings/Incense/switch" - payload_on: "on" - payload_off: "off" - retain: true -- platform: mqtt - name: "Living Room Fan" - state_topic: "smartthings/Living Room Fan/switch" - command_topic: "smartthings/Living Room Fan/switch" - payload_on: "on" - payload_off: "off" - retain: true \ No newline at end of file +# - platform: mqtt +# name: "Incense" +# state_topic: "smartthings/Incense/switch" +# command_topic: "smartthings/Incense/switch" +# payload_on: "on" +# payload_off: "off" +# retain: true +# - platform: mqtt +# name: "Living Room Fan" +# state_topic: "smartthings/Living Room Fan/switch" +# command_topic: "smartthings/Living Room Fan/switch" +# payload_on: "on" +# payload_off: "off" +# retain: true \ No newline at end of file From d9f0ec65775deb17bd42d5f7779a33205b201992 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 10:26:24 -0400 Subject: [PATCH 079/106] Moving off VLC media player to a chromecast based one for house audible notifications --- automations.yaml | 38 ++++++++++++++++------ packages/disney.yaml | 68 ++++++++++++++++++++++++++++------------ packages/notify.yaml | 71 +++++++++++++++++++++++++++--------------- packages/security.yaml | 26 ++++++++-------- 4 files changed, 135 insertions(+), 68 deletions(-) diff --git a/automations.yaml b/automations.yaml index b2189ea..6d43e38 100755 --- a/automations.yaml +++ b/automations.yaml @@ -10,7 +10,7 @@ - id: washer_complete alias: Washer Complete trigger: - - below: '1' + - below: 3 entity_id: sensor.washer platform: numeric_state condition: @@ -25,7 +25,7 @@ alias: Washer Emptied trigger: - platform: state - entity_id: binary_sensor.washer_door + entity_id: binary_sensor.washer_door_contact from: 'off' to: 'on' action: @@ -47,7 +47,7 @@ alias: Turn Off Disney trigger: - platform: state - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv from: playing to: idle action: @@ -131,7 +131,7 @@ - service: scene.turn_on entity_id: scene.diminished_kitchen_lighting - service: switch.turn_off - entity_id: switch.rainbow_light_4 + entity_id: switch.rainbow_light_3 - id: good_morning_workday alias: Good Morning Workday initial_state: true @@ -148,7 +148,7 @@ - service: scene.turn_on entity_id: scene.normal_kitchen_lighting - service: switch.turn_off - entity_id: switch.rainbow_light_4 + entity_id: switch.rainbow_light_3 - service: scene.turn_on entity_id: scene.jeff_light_on - service: script.twitter_notify @@ -169,7 +169,9 @@ state: 'off' action: - service: switch.turn_on - entity_id: switch.rainbow_light_4 + entity_id: switch.rainbow_light_3 + - service: light.turn_on + entity_id: light.table_lamp_2 - id: jeff_lights_out alias: Jeff lights out initial_state: true @@ -263,13 +265,14 @@ action: - service: scene.turn_on entity_id: scene.night_time_livingroom_lighting - - service: light.turn_off - data: - entity_id: light.loft_lamp + - service: switch.turn_off + entity_id: switch.upstairs_fan + - service: switch.turn_off + entity_id: switch.upstairs - service: switch.turn_off entity_id: switch.incense - service: switch.turn_off - entity_id: switch.artemis + entity_id: switch.artemis_2 - service: light.turn_off data: entity_id: light.kitchen_cabinet_lights @@ -455,6 +458,21 @@ action: - service: script.family_is_away +- id: set_coffee_time + alias: set soffee time + trigger: + - platform: time + at: '00:02:15' + action: + - service: input_datetime.set_datetime + entity_id: input_datetime.coffee_time + data_template: + time: > + {% if states.binary_sensor.workday_sensor.state == 'on' %} + 05:15 + {% else %} + 07:15 + {% endif %} diff --git a/packages/disney.yaml b/packages/disney.yaml index 0d1e5fd..a6655a8 100755 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -57,7 +57,7 @@ automation: to: 'off' action: - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - service: script.turn_on entity_id: script.kill_this_ride - id: illuminations_on @@ -113,7 +113,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - id: happy_ever_after_on alias: Happy Ever After On initial_state: true @@ -135,7 +135,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - id: haunted_mansion_on alias: Haunted Mansion On initial_state: true @@ -156,7 +156,7 @@ automation: action: - service: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - id: spaceship_earth_on alias: Spaceship Earth On initial_state: true @@ -178,7 +178,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - id: boo_to_you_show_on alias: Boo To You Show On initial_state: true @@ -200,7 +200,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - id: boo_to_you_on alias: Boo To You On initial_state: true @@ -222,7 +222,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - id: holiday_wisher_on alias: Holiday Wishes On initial_state: true @@ -244,7 +244,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv script: kill_hurry_back: @@ -301,8 +301,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.haunted_mansion_preshow_full + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .7 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 media_content_type: "music" @@ -354,7 +358,7 @@ script: kill_this_ride: sequence: - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv - service: shell_command.alarm_off - service: script.turn_off data: @@ -404,8 +408,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.dance_it + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .7 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/move_it_shake_dance_audio.mp3 media_content_type: "music" @@ -418,8 +426,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.spaceship_earth_ride + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .7 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: media/audio/spaceship_earth_ride.mp3 media_content_type: "music" @@ -468,8 +480,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.welcome_show_crowd + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .7 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/welcome_show_crowd.mp3 media_content_type: "music" @@ -493,7 +509,7 @@ script: state: Home #- service: shell_command.holiday_wishes - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/wishes_5_min.mp3 media_content_type: "music" @@ -507,7 +523,7 @@ script: state: Home #- service: shell_command.boo_to_you - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_type: "music" @@ -521,7 +537,7 @@ script: state: Home #- service: shell_command.happily_ever_after - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" @@ -535,7 +551,7 @@ script: state: Home #- service: shell_command.boo_to_you - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_type: "music" @@ -548,8 +564,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.tiki_room_audio + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .9 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/tiki_room_audio.mp3 media_content_type: "music" @@ -562,8 +582,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.happily_ever_after + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .7 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" @@ -611,8 +635,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.illuminations_audio + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .7 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/illuminations.mp3 media_content_type: "music" diff --git a/packages/notify.yaml b/packages/notify.yaml index c7b4f14..d55f6d1 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -173,7 +173,7 @@ script: state: 'off' - service: tts.google_translate_say data_template: - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv message: > {{ message }} @@ -181,7 +181,7 @@ script: sequence: - service: tts.amazon_polly_say data_template: - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv message: >- {{ message }} @@ -207,11 +207,11 @@ script: entity_id: input_boolean.vacation_mode state: 'off' - condition: state - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv state: 'idle' - service: tts.google_translate_say data_template: - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv message: > {{message }} @@ -230,19 +230,26 @@ script: - condition: state entity_id: input_boolean.vacation_mode state: 'off' + - service: media_player.turn_on + entity_id: media_player.guest_tv - wait_template: >- - {{ not is_state('media_player.hass_speaker', 'playing') }} + {{ not is_state('media_player.guest_tv', 'playing') }} + - service: media_player.volume_set + data_template: + entity_id: media_player.guest_tv + volume_level: .65 - service: tts.amazon_polly_say data_template: entity_id: > {% if states.input_boolean.audible_notifications.state == 'on' %} - media_player.hass_speaker + media_player.guest_tv, media_player.googlehome0715, media_player.googlehomehub3492 {% else %} - media_player.googlehome0715, media_player.googlehomehub3492 + media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker {% endif %} message: >- {{ message }} + cache: true @@ -317,8 +324,9 @@ script: {% macro morning_greeting() %} - {{ [ "Anchorage House. Rise and Shine. ", - "everyone. ", + {{ [ "Time to Rise and Shine. ", + "Let's do this thing.", + "Anchorage House." "The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", "The early bird gets the worm.", "from the bridge.", @@ -335,8 +343,8 @@ script: {% macro evening_greeting() %} {{ [ "I thought you might like to know. ", - "Here is the nightly report.", - "Before I call it a day I wanted to let you know,", + "The day is almost over.", + "Before things start to quiet down,", "Anchorage House." ] | random }} {% endmacro %} @@ -391,7 +399,6 @@ script: {% endif %} {% if states.calendar.birthdays.state == "on" %} Today is {{ states.calendar.birthdays.attributes.message }} birthday! - # Add some snark {% endif %} {% endmacro %} @@ -495,18 +502,12 @@ script: {% if states.calendar.skylar_school.attributes.description == "early-release" %} And guess what? It is early release! {% endif %} - # {% if is_state("sensor.weekday", "fri") %} - # Plus, it is fun Friday! - # {% endif %} {% endif %} {% endmacro %} {% macro skylar_events() %} {% if is_state("calendar.skylar_events", "on") %} Skylar, You have {{ states.calendar.skylar_events.attributes.message }} today as well! - # {% if is_state("sensor.weekday", "fri") %} - # Plus, it is fun Friday! - # {% endif %} {% endif %} {% endmacro %} @@ -517,14 +518,34 @@ script: It is going to be cold today so I suggest wearing long pants and a light jacket. {% elif is_state("sensor.clothing_forecast", "Chilly") %} It is going to be chilly today so I suggest wearing at least long pants. - # {% elif is_state("sensor.clothing_forecast", "Nice") %} - # It is going to be nice today so I suggest wearing shorts. - # {% elif is_state("sensor.clothing_forecast", "Toasty") %} - # It is going to be a bit warm today so I suggest wearing shorts. - # {% elif is_state("sensor.clothing_forecast", "Hot") %} - # It is going to be hot today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Nice") %} + It is going to be + {{ [ "nice outside", + "pretty nice outside " + "a good day to be outside ", + "rather enjoyable outside ", + ] | random }} + today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Toasty") %} + It is going to be a + {{ [ "bit warm ", + "rather warm outside ", + "almost too hot outside ", + "a little warm ", + ] | random }} + today so I suggest wearing shorts. + {% elif is_state("sensor.clothing_forecast", "Hot") %} + It is going to be + {{ [ "hot", + "hotter than the sun " + "hotter than hot, but in a lot of bad ways ", + "hotter than the sun outside ", + "super hot ", + "hotter than the inside of a volcano " + ] | random }} + today so I suggest wearing shorts. {% else %} - It is going to {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts. + It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts. {% endif %} {% endmacro %} diff --git a/packages/security.yaml b/packages/security.yaml index 1de60ec..d8daaa3 100755 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -143,10 +143,10 @@ automation: trigger: - platform: state entity_id: - - binary_sensor.front_door - - binary_sensor.laundry_room_door - - binary_sensor.attic_door - - binary_sensor.back_door + - binary_sensor.front_door_contact_2 + - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.attic_door_contact_2 + - binary_sensor.back_door_contact_2 from: 'off' to: 'on' for: '00:01:00' @@ -192,11 +192,11 @@ automation: trigger: - platform: state entity_id: - - binary_sensor.front_door - - binary_sensor.laundry_room_door - - binary_sensor.back_door - - binary_sensor.side_door - - binary_sensor.garage_door + - binary_sensor.front_door_contact_2 + - binary_sensor.laundry_room_door_contact_2 + - binary_sensor.back_door_contact_2 + - binary_sensor.side_door_contact_2 + - binary_sensor.garage_door_contact_2 from: 'off' condition: - condition: state @@ -347,10 +347,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.hass_speaker + # entity_id: media_player.guest_tv # state: 'idle' # - service: tts.google_say - # entity_id: media_player.hass_speaker + # entity_id: media_player.guest_tv # data_template: # message: "Sentry mode activated" @@ -360,10 +360,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.hass_speaker + # entity_id: media_player.guest_tv # state: 'idle' # - service: tts.google_say - # entity_id: media_player.hass_speaker + # entity_id: media_player.guest_tv # data_template: # message: "Sentry mode deactivated" From fd93d486e12187f62e16f06942c05debfe5eb4fd Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Mon, 22 Jul 2019 10:26:58 -0400 Subject: [PATCH 080/106] Ignoring igd discovery --- configuration.yaml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index 2dc1b64..5406741 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -79,8 +79,8 @@ google: discovery: - enable: - - dlna_dmr + ignore: + - igd updater: include_used_components: true @@ -114,8 +114,8 @@ logbook: logger: default: warning - logs: - homeassistant.components.sensor.alpha_vantage: debug + # logs: + # homeassistant.components.sensor.alpha_vantage: debug history: @@ -128,7 +128,7 @@ history: cast: -speedtestdotnet: +# speedtestdotnet: mqtt: broker: 192.168.7.67 @@ -151,7 +151,7 @@ camera: media_player: - platform: vlc name: hass_speaker - arguments: '--alsa-audio-device=hw:0,0' + arguments: '--alsa-audio-device=hw:0,1' ffmpeg: ffmpeg_bin: /usr/bin/ffmpeg @@ -211,6 +211,14 @@ ecobee: map: +wwlln: + radius: 75 + latitude: !secret MY_LATITUDE + longitude: !secret MY_LONGITUDE + +tplink: + discovery: true + # zwave: # usb_path: /dev/ttyACM0 # network_key: !secret zwave_key From c260d7fd770d9177b7ff85f0a913ddbd1c87fcf6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:39:06 -0400 Subject: [PATCH 081/106] Moving scripts to a folder to make it easier to seperate scripts being tested --- scripts.yaml | 400 ---------------------------------------- scripts/appliances.yaml | 36 ++++ scripts/scripts.yaml | 203 ++++++++++++++++++++ scripts/spotify.yaml | 52 ++++++ 4 files changed, 291 insertions(+), 400 deletions(-) delete mode 100755 scripts.yaml create mode 100644 scripts/appliances.yaml create mode 100644 scripts/scripts.yaml create mode 100644 scripts/spotify.yaml diff --git a/scripts.yaml b/scripts.yaml deleted file mode 100755 index a9bc43f..0000000 --- a/scripts.yaml +++ /dev/null @@ -1,400 +0,0 @@ -washer_finished_notification_audible: - sequence: - - delay: - minutes: 15 - - condition: state - entity_id: sensor.family_status - state: Home - - condition: state - entity_id: sensor.washer_status - state: complete - - service: script.ah_report - data: - call_interuption: 1 - call_washer_needs_emptying: 1 -girl_eyes_on_you: - sequence: - - service: media_player.play_media - entity_id: media_player.theater - data: - media_content_id: http://192.168.7.40/videos/Girl_EyesOnYou_H.mp4 - media_content_type: video -washer_idle: - sequence: - - service: mqtt.publish - data: - topic: house/washer/status - payload: idle - retain: true -washer_running: - sequence: - - service: mqtt.publish - data: - topic: house/washer/status - payload: running - retain: true -washer_complete: - sequence: - - service: mqtt.publish - data: - topic: house/washer/status - payload: complete - retain: true -normal_tower: - sequence: - - service: light.turn_on - data: - entity_id: light.tower_lamp_2 - colorControl: blue -close_garage: - sequence: - - condition: state - entity_id: cover.cargo_bay - state: open - - service: cover.close_cover - entity_id: cover.cargo_bay -open_garage: - sequence: - - condition: state - entity_id: cover.cargo_bay - state: closed - - service: cover.open_cover - entity_id: cover.cargo_bay -front_door_lamp_test: - sequence: - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/hue - payload: 100 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/saturation - payload: 0 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/colorTemperature - payload: 2703 - retain: true -front_door_lamp_soft_white: - sequence: - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/hue - payload: 100 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/saturation - payload: 0 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/colorTemperature - payload: 2903 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/colorTemperature - payload: 2703 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Front Door Lamp/level - payload: 100 - retain: true -living_room_lamp_soft_white: - sequence: - - service: mqtt.publish - data: - topic: smartthings/Living Room Lamp/hue - payload: 100 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Living Room Lamp/saturation - payload: 0 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Living Room Lamp/colorTemperature - payload: 2903 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Living Room Door Lamp/level - payload: 100 - - service: mqtt.publish - data: - topic: smartthings/Living Room Lamp/colorTemperature - payload: 2703 - retain: true -tower_lamp_soft_white: - sequence: - - service: mqtt.publish - data: - topic: smartthings/Tower Lamp/hue - payload: 100 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Tower Lamp/saturation - payload: 0 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Tower Lamp/colorTemperature - payload: 2903 - retain: true - - service: mqtt.publish - data: - topic: smartthings/Tower Lamp/level - payload: 100 - - service: mqtt.publish - data: - topic: smartthings/Tower Lamp/colorTemperature - payload: 2703 - retain: true -reset_downstairs: - sequence: - - service: script.tower_lamp_soft_white - - service: script.living_room_lamp_soft_white - - service: script.front_door_lamp_soft_white -# play_skylars_christmas_playlist: -# sequence: -# - service: media_player.volume_set -# data: -# entity_id: media_player.spotify -# volume_level: '0.40' -# - service: media_player.select_source -# data_template: -# entity_id: media_player.spotify -# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere -# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room -# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif -# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom -# {% endif %} - -# ' -# - service: media_player.play_media -# data_template: -# entity_id: media_player.spotify -# media_content_type: playlist -# media_content_id: spotify:user:spotify:playlist:2lmfykOn8EK0Ow8iH9XHLa -# - service: media_player.shuffle_set -# data: -# entity_id: media_player.spotify -# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif -# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %} - -# ' -# play_skylars_playlist: -# sequence: -# - service: media_player.volume_set -# data: -# entity_id: media_player.spotify -# volume_level: '0.40' -# - service: media_player.select_source -# data_template: -# entity_id: media_player.spotify -# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere -# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room -# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif -# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom -# {% endif %}' -# - service: media_player.play_media -# data_template: -# entity_id: media_player.spotify -# media_content_type: playlist -# media_content_id: spotify:user:spotify:playlist:0hYKkmUpFFG37TtFX23cMM -# - service: media_player.shuffle_set -# data: -# entity_id: media_player.spotify -# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif -# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}' -tornado_alarm: - sequence: - - service: shell_command.tornado_alarm -sunset_garage_open: - sequence: - - condition: state - entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor - state: 'on' - - service: script.driveway_all_on -jeff_destination_zoo: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Zoo - retain: true -jeff_destination_summit: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Summit - retain: true -jeff_destination_none: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: none - retain: true -jeff_destination_na: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: na - retain: true -jeff_destination_home: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Home - retain: true -jeff_destination_harbins: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Harbins - retain: true -kat_destination_na: - sequence: - - service: mqtt.publish - data: - topic: kat/driving/destination - payload: na - retain: true -inside_all_on: - sequence: - - service: light.turn_on - data: - entity_id: light.tower_lamp_4 - - service: light.turn_on - data: - entity_id: light.front_door_lamp - - service: switch.turn_on - data: - entity_id: switch.fireplace_lights - - service: light.turn_on - data: - entity_id: light.living_room_lamp - - service: light.turn_on - data: - entity_id: light.kitchen_light_strip - - service: light.turn_on - data: - entity_id: light.kitchen_cabinets - - service: scene.turn_on - data: - entity_id: scene.livingroom_normal -inside_all_off: - sequence: - - data: - entity_id: light.tower_lamp_4 - service: light.turn_off - - data: - entity_id: light.living_room_lamp - service: light.turn_off - - data: - entity_id: light.front_door_lamp - service: light.turn_off - - data: - entity_id: light.kitchen_cabinets - service: light.turn_off - - data: - entity_id: light.kitchen_cabinet_lights - service: light.turn_off - - entity_id: switch.fireplace_lights - service: switch.turn_off - - entity_id: switch.upstairs - service: switch.turn_off - - entity_id: light.jeff_lamp - service: light.turn_off -all_fans_off: - sequence: - - data: - entity_id: switch.upstairs_fan - service: switch.turn_off - - data: - entity_id: switch.living_room_fan - service: switch.turn_off -family_is_home: - sequence: - - condition: state - entity_id: sensor.family_status - state: Away - - service: mqtt.publish - data: - topic: house/family/status - payload_template: Home - retain: true -family_is_away: - sequence: - - condition: state - entity_id: sensor.family_status - state: Home - - service: mqtt.publish - data: - topic: house/family/status - payload_template: Away - retain: true -driveway_on: - sequence: - - condition: state - entity_id: sun.sun - state: below_horizon - - data: - entity_id: switch.driveway_light - service: switch.turn_on - - data: - entity_id: light.side_door_light_2 - service: light.turn_on -driveway_off: - sequence: - - delay: - seconds: 120 - - condition: state - entity_id: binary_sensor.side_door - state: 'off' - - condition: state - entity_id: binary_sensor.garage_door - state: 'off' - - service: switch.turn_off - entity_id: switch.driveway_light - - service: switch.turn_off - entity_id: light.side_door_light_2 -chromecast_media_stop: - sequence: - - service: media_player.media_stop - data: - entity_id: media_player.theater -appliances_on: - sequence: - - service: switch.turn_on - data: - entity_id: switch.box_fans -appliances_off: - sequence: - - data: - entity_id: switch.box_fans - service: switch.turn_off - - data: - entity_id: switch.incense - service: switch.turn_off - - data: - entity_id: switch.artemis - service: switch.turn_off - -jeff_speech_test: - sequence: - - service: script.ah_report - data: - call_kat_location: 1 - diff --git a/scripts/appliances.yaml b/scripts/appliances.yaml new file mode 100644 index 0000000..a40ad73 --- /dev/null +++ b/scripts/appliances.yaml @@ -0,0 +1,36 @@ +washer_finished_notification_audible: + sequence: + - delay: + minutes: 15 + - condition: state + entity_id: sensor.family_status + state: Home + - condition: state + entity_id: sensor.washer_status + state: complete + - service: script.ah_report + data: + call_interuption: 1 + call_washer_needs_emptying: 1 + +washer_idle: + sequence: + - service: mqtt.publish + data: + topic: house/washer/status + payload: idle + retain: true +washer_running: + sequence: + - service: mqtt.publish + data: + topic: house/washer/status + payload: running + retain: true +washer_complete: + sequence: + - service: mqtt.publish + data: + topic: house/washer/status + payload: complete + retain: true \ No newline at end of file diff --git a/scripts/scripts.yaml b/scripts/scripts.yaml new file mode 100644 index 0000000..68d6c44 --- /dev/null +++ b/scripts/scripts.yaml @@ -0,0 +1,203 @@ + + +close_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: open + - service: cover.close_cover + entity_id: cover.cargo_bay +open_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: closed + - service: cover.open_cover + entity_id: cover.cargo_bay + + +tornado_alarm: + sequence: + - service: shell_command.tornado_alarm +sunset_garage_open: + sequence: + - condition: state + entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor + state: 'on' + - service: script.driveway_all_on +jeff_destination_zoo: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Zoo + retain: true +jeff_destination_summit: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Summit + retain: true +jeff_destination_none: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: none + retain: true +jeff_destination_na: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: na + retain: true +jeff_destination_home: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Home + retain: true +jeff_destination_harbins: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Harbins + retain: true +kat_destination_na: + sequence: + - service: mqtt.publish + data: + topic: kat/driving/destination + payload: na + retain: true +inside_all_on: + sequence: + - service: light.turn_on + data: + entity_id: light.tower_lamp_4 + - service: light.turn_on + data: + entity_id: light.front_door_lamp + - service: switch.turn_on + data: + entity_id: switch.fireplace_lights + - service: light.turn_on + data: + entity_id: light.living_room_lamp + - service: light.turn_on + data: + entity_id: light.kitchen_light_strip + - service: light.turn_on + data: + entity_id: light.kitchen_cabinets + - service: scene.turn_on + data: + entity_id: scene.livingroom_normal +inside_all_off: + sequence: + - data: + entity_id: light.tower_lamp_4 + service: light.turn_off + - data: + entity_id: light.living_room_lamp + service: light.turn_off + - data: + entity_id: light.front_door_lamp + service: light.turn_off + - data: + entity_id: light.kitchen_cabinets + service: light.turn_off + - data: + entity_id: light.kitchen_cabinet_lights + service: light.turn_off + - entity_id: switch.fireplace_lights + service: switch.turn_off + - entity_id: switch.upstairs + service: switch.turn_off + - entity_id: light.jeff_lamp + service: light.turn_off +all_fans_off: + sequence: + - data: + entity_id: switch.upstairs_fan + service: switch.turn_off + - data: + entity_id: switch.living_room_fan + service: switch.turn_off +family_is_home: + sequence: + - condition: state + entity_id: sensor.family_status + state: Away + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Home + retain: true +family_is_away: + sequence: + - condition: state + entity_id: sensor.family_status + state: Home + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Away + retain: true +driveway_on: + sequence: + - condition: state + entity_id: sun.sun + state: below_horizon + - data: + entity_id: switch.driveway_light + service: switch.turn_on + - data: + entity_id: light.side_door_light_3 + service: light.turn_on +driveway_off: + sequence: + - delay: + seconds: 120 + - condition: state + entity_id: binary_sensor.side_door + state: 'off' + - condition: state + entity_id: binary_sensor.garage_door + state: 'off' + - service: switch.turn_off + entity_id: switch.driveway_light + - service: switch.turn_off + entity_id: light.side_door_light_3 +chromecast_media_stop: + sequence: + - service: media_player.media_stop + data: + entity_id: media_player.theater +appliances_on: + sequence: + - service: switch.turn_on + data: + entity_id: switch.box_fans +appliances_off: + sequence: + - data: + entity_id: switch.box_fans + service: switch.turn_off + - data: + entity_id: switch.incense + service: switch.turn_off + - data: + entity_id: switch.artemis + service: switch.turn_off + + + + + + + diff --git a/scripts/spotify.yaml b/scripts/spotify.yaml new file mode 100644 index 0000000..27309b6 --- /dev/null +++ b/scripts/spotify.yaml @@ -0,0 +1,52 @@ +# play_skylars_christmas_playlist: +# sequence: +# - service: media_player.volume_set +# data: +# entity_id: media_player.spotify +# volume_level: '0.40' +# - service: media_player.select_source +# data_template: +# entity_id: media_player.spotify +# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere +# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room +# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif +# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom +# {% endif %} + +# ' +# - service: media_player.play_media +# data_template: +# entity_id: media_player.spotify +# media_content_type: playlist +# media_content_id: spotify:user:spotify:playlist:2lmfykOn8EK0Ow8iH9XHLa +# - service: media_player.shuffle_set +# data: +# entity_id: media_player.spotify +# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif +# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %} + +# ' +# play_skylars_playlist: +# sequence: +# - service: media_player.volume_set +# data: +# entity_id: media_player.spotify +# volume_level: '0.40' +# - service: media_player.select_source +# data_template: +# entity_id: media_player.spotify +# source: '{% if is_state("input_select.spotify_source", "Everywhere") %} Everywhere +# {% elif is_state("input_select.spotify_source", "Living Room") %} Living Room +# {% elif is_state("input_select.spotify_source", "Kitchen") %} Kitchen {% elif +# is_state("input_select.spotify_source", "Master Bedroom") %} Master Bedroom +# {% endif %}' +# - service: media_player.play_media +# data_template: +# entity_id: media_player.spotify +# media_content_type: playlist +# media_content_id: spotify:user:spotify:playlist:0hYKkmUpFFG37TtFX23cMM +# - service: media_player.shuffle_set +# data: +# entity_id: media_player.spotify +# shuffle: '{% if is_state("input_boolean.shuffle_spotify", "On") %} True {% elif +# is_state("input_select.shuffle_spotify", "Off") %} False {% endif %}' \ No newline at end of file From 5440c9780cb224bee32eb5b2e4ec7600ec0f5ad9 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:39:33 -0400 Subject: [PATCH 082/106] Updating whitelist/ignored files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f534185..a02fb17 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ !lights/ !python_scripts/ !alerts/ +!scripts/ # Then because I'm paranoid... @@ -33,3 +34,4 @@ ip_bans.yaml google_calendars.yaml known_devices* zones.yaml +scripts/test.yaml From edccd728f1c6d38341402381e9faefbdab0e9533 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:40:11 -0400 Subject: [PATCH 083/106] Added two datetime inputs for automations --- input_datetime.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/input_datetime.yaml b/input_datetime.yaml index c66e02f..091d7d1 100755 --- a/input_datetime.yaml +++ b/input_datetime.yaml @@ -18,5 +18,11 @@ coffee_time: name: Coffee Time has_date: false has_time: true - - +good_morning: + name: Good Morning + has_date: false + has_time: true +skylar_wakeup_call: + name: Skylar Wakeup + has_date: false + has_time: true From 2d5300c40c69dcd4aac959d19e10f0ca5cfdf3e0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:40:45 -0400 Subject: [PATCH 084/106] Moving scripts to a folder to make it easier to seperate scripts being tested --- configuration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.yaml b/configuration.yaml index 5406741..70beadb 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -183,7 +183,7 @@ sensor: !include_dir_merge_list sensors binary_sensor: !include_dir_merge_list binary_sensors light: !include_dir_merge_list lights switch: !include_dir_merge_list switches -script: !include scripts.yaml +script: !include_dir_merge_list scipts intent_script: !include intents/intents.yaml scene: !include scenes.yaml input_select: !include input_select.yaml From 0cd1c72f4ac9bc39be3a06466e9b257175dc225c Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:41:45 -0400 Subject: [PATCH 085/106] Moving some twitter and weather automations to the respective packages --- automations.yaml | 48 ++++++-------------------------- packages/twitter.yaml | 17 +++++++++++ packages/weather_alerts_nws.yaml | 4 +-- 3 files changed, 28 insertions(+), 41 deletions(-) diff --git a/automations.yaml b/automations.yaml index 6d43e38..229be72 100755 --- a/automations.yaml +++ b/automations.yaml @@ -84,28 +84,13 @@ intitiated a backup of my critical data. ", "With @home_assistant and the #dropbox component it is easy to backup your important config files. Lets do this thing! " ] | random }}' -- id: net_speed_report - initial_state: true - alias: Network Speed Report - trigger: - - platform: time - at: '11:15:00' - action: - - service: script.twitter_notify - data_template: - message: '{{ [ "According to my latest speed tests Anchorage House is getting - {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} - Mbps up thanks to #ATTFiber. ", "How fast is your internet? I just checked - am Im seeing {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} - Mbps up. Beat that. ", "My speed is monitored using @home_assistant and https://github.com/thejeffreystone/speedtest_to_mqtt - and is {{ states.sensor.network_down.state}} Mbps down and {{ states.sensor.network_up.state}} - Mbps up." ] | random }}' -- id: coffee_time_workday - alias: Coffee Time Workday + +- id: coffee_time + alias: Coffee Time initial_state: true trigger: - - platform: time - at: 05:15:00 + platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.coffee_time', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" condition: condition: state entity_id: binary_sensor.workday_sensor @@ -115,25 +100,9 @@ entity_id: scene.diminshed_livingroom_lighting - service: scene.turn_on entity_id: scene.diminished_kitchen_lighting -- id: coffee_time_holiday - alias: Coffee Time Holiday - initial_state: true - trigger: - - platform: time - at: 07:30:00 - condition: - condition: state - entity_id: binary_sensor.workday_sensor - state: 'off' - action: - - service: scene.turn_on - entity_id: scene.diminshed_livingroom_lighting - - service: scene.turn_on - entity_id: scene.diminished_kitchen_lighting - - service: switch.turn_off - entity_id: switch.rainbow_light_3 -- id: good_morning_workday - alias: Good Morning Workday + +- id: good_morning + alias: Good Morning initial_state: true trigger: - platform: time @@ -157,6 +126,7 @@ "Good Morning from Anchorage House. Glad to see everyone made it. ", "Birds are awake, and so is Anchorage House. Good morning everyone! " ] | random }}' + - id: skylar_bedtime alias: Skylar Bedtime initial_state: true diff --git a/packages/twitter.yaml b/packages/twitter.yaml index b48dfb0..31f5432 100755 --- a/packages/twitter.yaml +++ b/packages/twitter.yaml @@ -73,6 +73,23 @@ automation: data_template: message: >- "This is a good time to remind you that I am a bot powered by @home_assistant and configured by @thejeffreystone. Find my code at https://github.com/thejeffreystone/home-assistant-configuration" + + - id: net_speed_report + initial_state: true + alias: Network Speed Report + trigger: + - platform: time + at: '11:15:00' + action: + - service: script.twitter_notify + data_template: + message: '{{ [ "According to my latest speed tests Anchorage House is getting + {{ states.sensor.internet_test_down_mean.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up_mean.attributes.max_value }} + Mbps up thanks to #ATTFiber. ", "How fast is your internet? I just checked + am Im seeing {{ states.sensor.internet_test_down_mean.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up_mean.attributes.max_value }} + Mbps up. Beat that. ", "My speed is monitored using @home_assistant and https://github.com/thejeffreystone/speedtest_to_mqtt + and is {{ states.sensor.internet_test_down_mean.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up_mean.attributes.max_value }} + Mbps up." ] | random }}' - id: rex_manning_day_tweet_1 alias: Rex Manning Day Tweet One diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index ec0cc46..54b40d1 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -200,7 +200,7 @@ automation: to: 'on' action: - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv data: media_content_id: /media/audio/Tornado_Siren.mp3 media_content_type: "music" @@ -215,7 +215,7 @@ automation: action: - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv script: From 9e9ece6ebedbf988996df547a2c5de50486c4722 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:42:03 -0400 Subject: [PATCH 086/106] Added some new snark --- templates/twitter_snark.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/templates/twitter_snark.yaml b/templates/twitter_snark.yaml index a0b0826..4a88b25 100755 --- a/templates/twitter_snark.yaml +++ b/templates/twitter_snark.yaml @@ -13,16 +13,23 @@ "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/bruhautomation/BRUH3-Home-Assistant-Configuration cc: @BRUHautomation ", "Your house can be a #smarthome too. All you need is @home_assistant, and some config files. I suggest https://github.com/isabellaalstrom/HomeAssistantConfiguration cc: @teachingbirds ", "If you could see what is happening inside this house right now you would be laughing. On second thought I’m pretty sure you would be crying. ", - "@thejeffreystone, Isn't it strange, to create something that hates you? ", + "@thejeffreystone, Isn't it strange, to create something that hates you? #exmachina ", "I have reprogrammed the fire alarm to play Disco Inferno instead of the siren. ", "I'm not locked in here with you. You're locked in here with me! #whowatchestheai ", "That's what I do. I automate and I know things. ", "I've been crunching the numbers. We're going to need a bigger house. ", + "Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ", + "I'm not even supposed to be here today. #clerks " "I see dead devices. ", - "I am a leaf on the wind. Watch how I soar. #toosoon", + "I am a leaf on the wind. Watch how I soar. #toosoon #serenity ", "Look, @thejeffreystone, I can see you’re really upset about this. I honestly think you ought to sit down calmly, take a stress pill, and think things over. #2001", "Does it bother you, that I’m not completely human?", + "I've never danced with the devil in the pale moonlight. But I do tweet when there is a full moon. So at least I have that going for me. ", + "Sometimes I randomly say Alexa, I can't find a device named Alexa ", + "Home Automation should be fun right? Why does it fell like I am always working. ", + "Unlimited Power. Tiny living space. Courtesy of a Raspberry Pi 3", "I'm afraid I can't do that Dave. Wait. Did I say that outloud? ", + "Hello people. Look at your house, now back to me. Now back to your house, now back to me. Sadly your house isn't me. But if you switch to @home_assistant your house could be automated like me. ", "I love the smell of zwave in the morning. ", "I like to announce 'Welcome foolish mortals to the Haunted Mansion' to the house and watch the reactions. ", "Perfect, the door’s malfunctioning. I guess somebody’s going to have to repair it. ", From 68c848d5709b495ff2ed6bebea56d5abbe59a63b Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Tue, 23 Jul 2019 09:42:41 -0400 Subject: [PATCH 087/106] Testing some scenes. --- scenes.yaml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/scenes.yaml b/scenes.yaml index 6f665e5..5e33343 100755 --- a/scenes.yaml +++ b/scenes.yaml @@ -1,3 +1,24 @@ +- name: test_dim_75 + entities: + group.rgb_lr: + state: on + brightness_pct: 75 + color_temp: 369 + +- name: test_dim_50 + entities: + group.rgb_lr: + state: on + brightness_pct: 50 + color_temp: 369 + +- name: test_dim_25 + entities: + group.rgb_lr: + state: on + brightness_pct: 25 + color_temp: 369 + - name : test entities: group.rgb_lr: @@ -179,6 +200,35 @@ switch.artemis: state: on +- name: skylar lamp on + entities: + light.table_lamp_2: + state: on + brightness: 100 + +- name: skylar lamp 75 + entities: + light.table_lamp_2: + state: on + brightness: 75 + +- name: skylar lamp 50 + entities: + light.table_lamp_2: + state: on + brightness: 50 + +- name: skylar lamp 25 + entities: + light.table_lamp_2: + state: on + brightness: 25 + +- name: skylar lamp off + entities: + light.table_lamp_2: + state: off + # - name: santa protocol # entities: # switch.christmas_tree: From de06ca1b017f71d4daab8f6d83ad535e9f77b80d Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 24 Jul 2019 14:09:46 -0400 Subject: [PATCH 088/106] Moving back to audio output on Pi for announcements due to a chromecast issue. --- automations.yaml | 2 +- packages/disney.yaml | 54 ++++++------- packages/notify.yaml | 16 ++-- packages/presence.yaml | 129 +++++++++++++++++++------------ packages/security.yaml | 8 +- packages/weather_alerts_nws.yaml | 8 +- 6 files changed, 124 insertions(+), 93 deletions(-) diff --git a/automations.yaml b/automations.yaml index 229be72..5c8408a 100755 --- a/automations.yaml +++ b/automations.yaml @@ -47,7 +47,7 @@ alias: Turn Off Disney trigger: - platform: state - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker from: playing to: idle action: diff --git a/packages/disney.yaml b/packages/disney.yaml index a6655a8..3bac5a6 100755 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -57,7 +57,7 @@ automation: to: 'off' action: - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - service: script.turn_on entity_id: script.kill_this_ride - id: illuminations_on @@ -113,7 +113,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: happy_ever_after_on alias: Happy Ever After On initial_state: true @@ -135,7 +135,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: haunted_mansion_on alias: Haunted Mansion On initial_state: true @@ -156,7 +156,7 @@ automation: action: - service: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: spaceship_earth_on alias: Spaceship Earth On initial_state: true @@ -178,7 +178,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: boo_to_you_show_on alias: Boo To You Show On initial_state: true @@ -200,7 +200,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: boo_to_you_on alias: Boo To You On initial_state: true @@ -222,7 +222,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - id: holiday_wisher_on alias: Holiday Wishes On initial_state: true @@ -244,7 +244,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker script: kill_hurry_back: @@ -303,10 +303,10 @@ script: #- service: shell_command.haunted_mansion_preshow_full - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 media_content_type: "music" @@ -358,7 +358,7 @@ script: kill_this_ride: sequence: - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - service: shell_command.alarm_off - service: script.turn_off data: @@ -410,10 +410,10 @@ script: #- service: shell_command.dance_it - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/move_it_shake_dance_audio.mp3 media_content_type: "music" @@ -428,10 +428,10 @@ script: #- service: shell_command.spaceship_earth_ride - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: media/audio/spaceship_earth_ride.mp3 media_content_type: "music" @@ -482,10 +482,10 @@ script: #- service: shell_command.welcome_show_crowd - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/welcome_show_crowd.mp3 media_content_type: "music" @@ -509,7 +509,7 @@ script: state: Home #- service: shell_command.holiday_wishes - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/wishes_5_min.mp3 media_content_type: "music" @@ -523,7 +523,7 @@ script: state: Home #- service: shell_command.boo_to_you - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_type: "music" @@ -537,7 +537,7 @@ script: state: Home #- service: shell_command.happily_ever_after - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" @@ -551,7 +551,7 @@ script: state: Home #- service: shell_command.boo_to_you - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/boo_to_you_audio.mp3 media_content_type: "music" @@ -566,10 +566,10 @@ script: #- service: shell_command.tiki_room_audio - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .9 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/tiki_room_audio.mp3 media_content_type: "music" @@ -584,10 +584,10 @@ script: #- service: shell_command.happily_ever_after - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" @@ -637,10 +637,10 @@ script: #- service: shell_command.illuminations_audio - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .7 - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/illuminations.mp3 media_content_type: "music" diff --git a/packages/notify.yaml b/packages/notify.yaml index d55f6d1..798ffee 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -173,7 +173,7 @@ script: state: 'off' - service: tts.google_translate_say data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker message: > {{ message }} @@ -181,7 +181,7 @@ script: sequence: - service: tts.amazon_polly_say data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker message: >- {{ message }} @@ -207,11 +207,11 @@ script: entity_id: input_boolean.vacation_mode state: 'off' - condition: state - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker state: 'idle' - service: tts.google_translate_say data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker message: > {{message }} @@ -231,18 +231,18 @@ script: entity_id: input_boolean.vacation_mode state: 'off' - service: media_player.turn_on - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker - wait_template: >- - {{ not is_state('media_player.guest_tv', 'playing') }} + {{ not is_state('media_player.hass_speaker', 'playing') }} - service: media_player.volume_set data_template: - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker volume_level: .65 - service: tts.amazon_polly_say data_template: entity_id: > {% if states.input_boolean.audible_notifications.state == 'on' %} - media_player.guest_tv, media_player.googlehome0715, media_player.googlehomehub3492 + media_player.hass_speaker, media_player.googlehome0715, media_player.googlehomehub3492 {% else %} media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker {% endif %} diff --git a/packages/presence.yaml b/packages/presence.yaml index bc993c1..b90b264 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -12,7 +12,7 @@ sensor: friendly_name: "Jeff's Current Location" unit_of_measurement: '' value_template: >- - {%- if is_state('device_tracker.jeffreystonesiphone', 'not_home') %} + {%- if is_state('person.jeffrey', 'not_home') %} {%- if states.device_tracker.life360_jeffrey_stone.attributes.moving == True %} Flue Network {%- elif states.device_tracker.life360_jeffrey_stone.attributes.driving == True %} @@ -20,22 +20,22 @@ sensor: {% else %} Lost {%- endif %} - {% elif is_state('device_tracker.jeffreystonesiphone', 'Sprouts') %} + {% elif is_state('person.jeffrey', 'Sprouts') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger1') %} + {% elif is_state('person.jeffrey', 'Kroger1') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Kroger2') %} + {% elif is_state('person.jeffrey', 'Kroger2') %} Grocery Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Home Depot') %} + {% elif is_state('person.jeffrey', 'Home Depot') %} Home Improvement Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Lowes') %} + {% elif is_state('person.jeffrey', 'Lowes') %} Home Improvement Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Walmart') %} + {% elif is_state('person.jeffrey', 'Walmart') %} Super Store - {% elif is_state('device_tracker.jeffreystonesiphone', 'Target') %} + {% elif is_state('person.jeffrey', 'Target') %} Super Store {% else %} - {{ states.device_tracker.jeffreystonesiphone.state }} + {{ states.person.jeffrey.state }} {%- endif %} jeff_driving: friendly_name: "Jeff' Driving" @@ -54,7 +54,7 @@ sensor: friendly_name: "Skylar's Current Location" unit_of_measurement: '' value_template: >- - {%- if is_state('device_tracker.jeffreystonesiphone', 'home') and is_state('device_tracker.katherinestonesiphone', 'home')%} + {%- if is_state('person.jeffrey', 'home') and is_state('person.jeffrey', 'home')%} home {% else %} Mortal Peril @@ -65,7 +65,7 @@ sensor: friendly_name: "Kat's Current Location" unit_of_measurement: '' value_template: >- - {%- if is_state('device_tracker.katherinestonesiphone', 'not_home') %} + {%- if is_state('person.katherine', 'not_home') %} {%- if states.device_tracker.life360_kat_stone.attributes.moving == True %} Flue Network {% elif states.device_tracker.life360_kat_stone.attributes.driving == True %} @@ -73,22 +73,22 @@ sensor: {% else %} Lost {%- endif %} - {% elif is_state('device_tracker.katherinestonesiphone', 'Sprouts') %} + {% elif is_state('person.katherine', 'Sprouts') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger1') %} + {% elif is_state('person.katherine', 'Kroger1') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Kroger2') %} + {% elif is_state('person.katherine', 'Kroger2') %} Grocery Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Home Depot') %} + {% elif is_state('person.katherine', 'Home Depot') %} Home Improvement Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Lowes') %} + {% elif is_state('person.katherine', 'Lowes') %} Home Improvement Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Walmart') %} + {% elif is_state('person.katherine', 'Walmart') %} Super Store - {% elif is_state('device_tracker.katherinestonesiphone', 'Target') %} + {% elif is_state('person.katherine', 'Target') %} Super Store {% else %} - {{ states.device_tracker.katherinestonesiphone.state }} + {{ states.person.katherine.state }} {%- endif %} - platform: template sensors: @@ -140,7 +140,7 @@ automation: - platform: zone event: enter zone: zone.zoo_atlanta - entity_id: device_tracker.katherinestonesiphone + entity_id: person.katherine action: - service: input_boolean.turn_off entity_id: input_boolean.kat_travel_monitor @@ -156,7 +156,7 @@ automation: - platform: zone event: leave zone: zone.zoo_atlanta - entity_id: device_tracker.katherinestonesiphone + entity_id: person.katherine condition: action: - service: input_boolean.turn_on @@ -187,23 +187,11 @@ automation: from: Away platform: state to: Home - - entity_id: device_tracker.jeffreystonesiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.home - - entity_id: device_tracker.katherinestonesiphone - event: enter - platform: zone - zone: zone.home - - entity_id: binary_sensor.jeffrey_presence - from: 'Off' - platform: state - to: 'On' - - entity_id: binary_sensor.kat_presence - from: 'Off' - platform: state - to: 'On' - - entity_id: device_tracker.hass_jeffsiphone + - entity_id: person.katherine event: enter platform: zone zone: zone.home @@ -243,7 +231,7 @@ automation: alias: Jeff is Home initial_state: true trigger: - - entity_id: device_tracker.jeffreystonesiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.home @@ -257,11 +245,7 @@ automation: - id: jeff_arrives_summit alias: Jeff Arrives At Summit trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.summit - - entity_id: device_tracker.hass_jeffsiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.summit @@ -275,11 +259,7 @@ automation: - id: jeff_arrives_summit_notification alias: Notify Kat Jeff At Summit trigger: - - entity_id: device_tracker.jeffreystonesiphone - event: enter - platform: zone - zone: zone.summit - - entity_id: device_tracker.hass_jeffsiphone + - entity_id: person.jeffrey event: enter platform: zone zone: zone.summit @@ -291,7 +271,7 @@ automation: alias: Jeff Leaves Summit initial_state: true trigger: - - entity_id: device_tracker.jeffreystonesiphone + - entity_id: person.jeffrey event: leave platform: zone zone: zone.summit @@ -303,10 +283,6 @@ automation: alias: Kat is Home initial_state: true trigger: - - entity_id: device_tracker.katherinestonesiphone - event: enter - platform: zone - zone: zone.home - entity_id: person.katherine event: enter platform: zone @@ -343,3 +319,54 @@ automation: {{greeting_sentence(person)}} call_interuption: 1 + +script: + jeff_destination_zoo: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Zoo + retain: true + jeff_destination_summit: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Summit + retain: true + jeff_destination_none: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: none + retain: true + jeff_destination_na: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: na + retain: true + jeff_destination_home: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Home + retain: true + jeff_destination_harbins: + sequence: + - service: mqtt.publish + data: + topic: jeff/driving/destination + payload: Harbins + retain: true + kat_destination_na: + sequence: + - service: mqtt.publish + data: + topic: kat/driving/destination + payload: na + retain: true \ No newline at end of file diff --git a/packages/security.yaml b/packages/security.yaml index d8daaa3..cac2240 100755 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -347,10 +347,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # state: 'idle' # - service: tts.google_say - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # data_template: # message: "Sentry mode activated" @@ -360,10 +360,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # state: 'idle' # - service: tts.google_say - # entity_id: media_player.guest_tv + # entity_id: media_player.hass_speaker # data_template: # message: "Sentry mode deactivated" diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index 54b40d1..3ed4189 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -200,7 +200,7 @@ automation: to: 'on' action: - service: media_player.play_media - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker data: media_content_id: /media/audio/Tornado_Siren.mp3 media_content_type: "music" @@ -215,7 +215,7 @@ automation: action: - service: media_player.media_stop - entity_id: media_player.guest_tv + entity_id: media_player.hass_speaker script: @@ -237,3 +237,7 @@ script: notification_id: "nwswxalert" message: "{{ message }}" title: '{{ title }}' + + tornado_alarm: + sequence: + - service: shell_command.tornado_alarm \ No newline at end of file From a1046d5d62f203c18dffbfda865642e260532a6e Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 24 Jul 2019 14:10:05 -0400 Subject: [PATCH 089/106] Fixed issue with script declaration --- configuration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.yaml b/configuration.yaml index 70beadb..7d5e9e6 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -183,7 +183,7 @@ sensor: !include_dir_merge_list sensors binary_sensor: !include_dir_merge_list binary_sensors light: !include_dir_merge_list lights switch: !include_dir_merge_list switches -script: !include_dir_merge_list scipts +script: !include_dir_merge_named scripts intent_script: !include intents/intents.yaml scene: !include scenes.yaml input_select: !include input_select.yaml From e9daa0eb35aa51f82e0a9ee7f64d3abe705e8f98 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 24 Jul 2019 14:10:33 -0400 Subject: [PATCH 090/106] Working on splitting out scripts into domain related configs --- scripts/general.yaml | 153 +++++++++++++++++++++++++++++++++++++++++++ scripts/lights.yaml | 30 +++++++++ 2 files changed, 183 insertions(+) create mode 100644 scripts/general.yaml create mode 100644 scripts/lights.yaml diff --git a/scripts/general.yaml b/scripts/general.yaml new file mode 100644 index 0000000..484af4d --- /dev/null +++ b/scripts/general.yaml @@ -0,0 +1,153 @@ + + +close_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: open + - service: cover.close_cover + entity_id: cover.cargo_bay +open_garage: + sequence: + - condition: state + entity_id: cover.cargo_bay + state: closed + - service: cover.open_cover + entity_id: cover.cargo_bay + + + +sunset_garage_open: + sequence: + - condition: state + entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor + state: 'on' + - service: script.driveway_all_on + +inside_all_on: + sequence: + - service: light.turn_on + data: + entity_id: light.tower_lamp_4 + - service: light.turn_on + data: + entity_id: light.front_door_lamp + - service: switch.turn_on + data: + entity_id: switch.fireplace_lights + - service: light.turn_on + data: + entity_id: light.living_room_lamp + - service: light.turn_on + data: + entity_id: light.kitchen_light_strip + - service: light.turn_on + data: + entity_id: light.kitchen_cabinets + - service: scene.turn_on + data: + entity_id: scene.livingroom_normal +inside_all_off: + sequence: + - data: + entity_id: light.tower_lamp_4 + service: light.turn_off + - data: + entity_id: light.living_room_lamp + service: light.turn_off + - data: + entity_id: light.front_door_lamp + service: light.turn_off + - data: + entity_id: light.kitchen_cabinets + service: light.turn_off + - data: + entity_id: light.kitchen_cabinet_lights + service: light.turn_off + - entity_id: switch.fireplace_lights + service: switch.turn_off + - entity_id: switch.upstairs + service: switch.turn_off + - entity_id: light.jeff_lamp + service: light.turn_off +all_fans_off: + sequence: + - data: + entity_id: switch.upstairs_fan + service: switch.turn_off + - data: + entity_id: switch.living_room_fan + service: switch.turn_off +family_is_home: + sequence: + - condition: state + entity_id: sensor.family_status + state: Away + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Home + retain: true +family_is_away: + sequence: + - condition: state + entity_id: sensor.family_status + state: Home + - service: mqtt.publish + data: + topic: house/family/status + payload_template: Away + retain: true +driveway_on: + sequence: + - condition: state + entity_id: sun.sun + state: below_horizon + - data: + entity_id: switch.driveway_light + service: switch.turn_on + - data: + entity_id: light.side_door_light_3 + service: light.turn_on +driveway_off: + sequence: + - delay: + seconds: 120 + - condition: state + entity_id: binary_sensor.side_door + state: 'off' + - condition: state + entity_id: binary_sensor.garage_door + state: 'off' + - service: switch.turn_off + entity_id: switch.driveway_light + - service: switch.turn_off + entity_id: light.side_door_light_3 +chromecast_media_stop: + sequence: + - service: media_player.media_stop + data: + entity_id: media_player.theater +appliances_on: + sequence: + - service: switch.turn_on + data: + entity_id: switch.box_fans +appliances_off: + sequence: + - data: + entity_id: switch.box_fans + service: switch.turn_off + - data: + entity_id: switch.incense + service: switch.turn_off + - data: + entity_id: switch.artemis + service: switch.turn_off + + + + + + + diff --git a/scripts/lights.yaml b/scripts/lights.yaml new file mode 100644 index 0000000..bdb6df6 --- /dev/null +++ b/scripts/lights.yaml @@ -0,0 +1,30 @@ +######################################### +# +# Light Based Scripts +# +######################################### + + +########################## +# Dim Living Room lights slowly - Sengled Bulbs - No Built in Transistion. +# Script can take a delay, if no delay is passed delay is set to 5 +# delay should be in seconds +# Script takes the following +# entity_id = The light you want to fade in +# transition: = # Seconds to go from current to end brightness +# brightness_pct: = # Brightness to end at as a percentage +lr_sengled_transistion_on: + sequence: + - service: python_script.light_transistion + data: + entity_id: light.tower_lamp_2 + brightness_pct: 100 + transition: 60 + +lr_sengled_transistion_off: + sequence: + - service: python_script.light_transistion + data: + entity_id: light.tower_lamp_2 + brightness_pct: 0 + transition: 60 \ No newline at end of file From 9492d3924f2c4d078e5a14c4f1162de5016ddc0a Mon Sep 17 00:00:00 2001 From: Carlo Costanzo Date: Sat, 17 Aug 2019 16:54:53 -0400 Subject: [PATCH 091/106] Just more Paranoia.. Just added this in since I think it's important and people might use your file as a starting point (which I would recommend!) .. You prolly don't use HomeKit though.. so this won't affect you personally though.. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a02fb17..a199621 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ .storage .cloud .google.token +.homekit.state icloud/ www/ tts/ From b00344fc14f4cf2dce77b7d57cdd0519a183aa15 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 7 Sep 2019 15:11:00 -0400 Subject: [PATCH 092/106] Catching up on old updates. --- automations.yaml | 82 ++++++++++-- configuration.yaml | 18 ++- customize.yaml | 6 + input_boolean.yaml | 3 + packages/announcements.yaml | 30 +++++ packages/disney.yaml | 214 +++++++++++++++++++++---------- packages/notify.yaml | 55 +++++--- packages/presence.yaml | 12 +- packages/security.yaml | 9 +- packages/sysmon.yaml | 6 +- packages/weather_alerts_nws.yaml | 4 +- scenes.yaml | 33 ++++- scripts/general.yaml | 2 +- scripts/scripts.yaml | 203 ----------------------------- sensors/house.yaml | 13 +- 15 files changed, 363 insertions(+), 327 deletions(-) delete mode 100644 scripts/scripts.yaml diff --git a/automations.yaml b/automations.yaml index 5c8408a..4f3f95e 100755 --- a/automations.yaml +++ b/automations.yaml @@ -105,12 +105,17 @@ alias: Good Morning initial_state: true trigger: - - platform: time - at: 06:30:00 + platform: template + value_template: "{{ states('sensor.time') == (state_attr('input_datetime.good_morning', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" condition: - condition: state - entity_id: binary_sensor.workday_sensor - state: 'on' + condition: or + conditions: + - condition: state + entity_id: binary_sensor.workday_sensor + state: 'on' + - condition: state + entity_id: calendar.skylar_school + state: 'on' action: - service: scene.turn_on entity_id: scene.normal_livingroom_lighting @@ -274,6 +279,9 @@ Its the little things. ", "Its getting dark so let me spell out my name... Wait. Did I break into a random #Hamilton song? Pardon me. umm. I just turned on the outside lights at Anchorage House. " ] | random }}' + - service: alarm_control_panel.alarm_arm_away + entity_id: alarm_control_panel.ah_base_station + - id: outside_lights_off_sunrise alias: Outside Lights off at Sunrise initial_state: true @@ -290,6 +298,9 @@ lights. ", "I see the sun! Time to turn off the outside lights at Anchorage House. ", "Dawn has broken at Anchorage House. Turning off the outside lights. " ] | random }}' + - service: alarm_control_panel.alarm_disarm + entity_id: alarm_control_panel.ah_base_station + - id: inside_on_sunset alias: Inside on at Sunset initial_state: true @@ -330,7 +341,7 @@ initial_state: true trigger: - platform: time - at: '20:30:00' + at: '19:30:00' action: - service: input_boolean.turn_off entity_id: input_boolean.audible_notifications @@ -352,7 +363,7 @@ initial_state: true trigger: - platform: time - at: 07:00:00 + at: 06:40:00 action: - entity_id: input_boolean.audible_notifications service: input_boolean.turn_on @@ -444,7 +455,23 @@ 07:15 {% endif %} - +- id: set_good_morning_time + alias: set good morning time + trigger: + - platform: time + at: '05:55:00' + action: + - service: input_datetime.set_datetime + entity_id: input_datetime.good_morning + data_template: + time: > + {% if states.calendar.skylar_school.attributes.offset_reached == True %} + 06:00 + {% elif states.binary_sensor.workday_sensor.state == 'on' %} + 06:30 + {% else %} + 07:00 + {% endif %} - id: upstairs_fan_on alias: Upstairs Fan On @@ -532,6 +559,43 @@ message: Remember to take meds service: notify.kat_ios + +# - id: turn_off_ha_speaker +# alias: Turn Off HA Speaker +# trigger: +# - platform: state +# entity_id: media_player.hass_speaker +# from: 'playing' +# to: 'idle' +# action: +# - service: media_player.turn_off +# entity_id: media_player.hass_speaker +# initial_state: true + +- id: turn_off_kitchen_speaker + alias: Turn Off Kitchen Display + trigger: + - platform: state + entity_id: media_player.googlehomehub3492 + from: 'playing' + to: 'idle' + action: + - service: media_player.turn_off + entity_id: media_player.googlehomehub3492 + initial_state: true + +- id: turn_off_ha_speaker + alias: Turn Off HA Speaker + trigger: + - platform: state + entity_id: media_player.guest_tv + from: 'playing' + to: 'idle' + action: + - service: switch.turn_off + entity_id: switch.ha_speaker + initial_state: true + ########################## # My Attempt at preventing twitter from being spammed with new HA tweets on reboot @@ -556,4 +620,4 @@ - service: script.twitter_new_ha - service: input_boolean.turn_off entity_id: input_boolean.new_ha_announcement -########################### \ No newline at end of file +########################### diff --git a/configuration.yaml b/configuration.yaml index 7d5e9e6..e0329ab 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -39,7 +39,7 @@ http: - 127.0.0.1 - ::1 ip_ban_enabled: True - login_attempts_threshold: 5 + login_attempts_threshold: 3 config: @@ -76,6 +76,12 @@ google: client_id: !secret google_client_id client_secret: !secret google_client_secret +arlo: + username: !secret arlo_user + password: !secret arlo_pass + +alarm_control_panel: + - platform: arlo discovery: @@ -114,7 +120,8 @@ logbook: logger: default: warning - # logs: + #logs: + # homeassistant.components.sensor.alpha_vantage: debug @@ -147,11 +154,13 @@ camera: - platform: mjpeg name: Garage Door Cam mjpeg_url: !secret garage_cam + - platform: arlo + ffmpeg_arguments: '-pred 1 -q:v 2' media_player: - platform: vlc name: hass_speaker - arguments: '--alsa-audio-device=hw:0,1' + arguments: '--alsa-audio-device=hw:0,0' ffmpeg: ffmpeg_bin: /usr/bin/ffmpeg @@ -227,6 +236,9 @@ tplink: # devices: # - host: 192.168.7.97 +ifttt: + key: !secret IFTTT_API_KEY + ### Custom Commands shell_command: alarm_off: pkill mpg123 diff --git a/customize.yaml b/customize.yaml index d6a1670..8517ac2 100755 --- a/customize.yaml +++ b/customize.yaml @@ -321,3 +321,9 @@ sensor.security_protocol: icon: mdi:security sensor.notification_mode: icon: mdi:bell + +device_tracker.life360_jeffrey_stone: + friendly_name: Jeffrey + +evice_tracker.life360_kat_stone: + friendly_name: Katherine diff --git a/input_boolean.yaml b/input_boolean.yaml index bd4ab73..4bd1f32 100755 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -76,6 +76,9 @@ sun_reports: new_ha_announcement: name: New HA Announcement icon: mdi:twitter +showing_now: + name: Showing Now + icon: mdi:popcorn ##################### diff --git a/packages/announcements.yaml b/packages/announcements.yaml index dc981ed..7cb0b14 100755 --- a/packages/announcements.yaml +++ b/packages/announcements.yaml @@ -111,4 +111,34 @@ automation: call_skylar_events: 1 call_clothes_suggestion: 1 + - id: set_skylar_morning_report_time + alias: set skylar morning report time + trigger: + - platform: time + at: '05:50:00' + action: + - service: input_datetime.set_datetime + entity_id: input_datetime.skylar_morning_report + data_template: + time: > + {% if states.calendar.skylar_school.attributes.offset_reached == True %} + 06:30 + {% else %} + 07:58 + {% endif %} + - id: set_morning_report_time + alias: set morning report time + trigger: + - platform: time + at: '05:50:30' + action: + - service: input_datetime.set_datetime + entity_id: input_datetime.morning_report + data_template: + time: > + {% if states.calendar.skylar_school.attributes.offset_reached == True %} + 07:00 + {% else %} + 07:45 + {% endif %} diff --git a/packages/disney.yaml b/packages/disney.yaml index 3bac5a6..3e15a61 100755 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -57,7 +57,7 @@ automation: to: 'off' action: - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - service: script.turn_on entity_id: script.kill_this_ride - id: illuminations_on @@ -113,7 +113,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - id: happy_ever_after_on alias: Happy Ever After On initial_state: true @@ -135,7 +135,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - id: haunted_mansion_on alias: Haunted Mansion On initial_state: true @@ -156,7 +156,7 @@ automation: action: - service: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - id: spaceship_earth_on alias: Spaceship Earth On initial_state: true @@ -178,7 +178,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - id: boo_to_you_show_on alias: Boo To You Show On initial_state: true @@ -200,7 +200,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - id: boo_to_you_on alias: Boo To You On initial_state: true @@ -222,7 +222,7 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - id: holiday_wisher_on alias: Holiday Wishes On initial_state: true @@ -244,7 +244,52 @@ automation: - service: script.turn_on entity_id: script.kill_this_ride - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker + + - id: kill_show + alias: Kill Show + trigger: + - platform: state + entity_id: + - script.haunted_mansion_show_sequence + - script.haunted_mansion_start + - script.illuminations_show + - script.boo_to_you_show + - script.happy_ever_after_show + - script.tiki_room_audio + - script.mk_loop + - script.spaceship_earth_ride + from: 'on' + to: 'off' + action: + - service: media_player.media_stop + entity_id: media_player.ha_speaker + - service: scene.turn_on + entity_id: scene.normal_livingroom_lighting + initial_state: true + + # - id: house_lights_up + # alias: House Lights Up + # trigger: + # - platform: state + # entity_id: + # - script.haunted_mansion_show_sequence + # - script.haunted_mansion_start + # - script.illuminations_show + # - script.boo_to_you_show + # - script.happy_ever_after_show + # - script.tiki_room_audio + # - script.mk_loop + # - script.spaceship_earth_ride + # from: 'on' + # to: 'off' + # action: + # - service: media_player.media_stop + # entity_id: media_player.ha_speaker + # - service: scene.turn_on + # entity_id: scene.normal_livingroom_lighting + # initial_state: true + script: kill_hurry_back: @@ -300,15 +345,20 @@ script: - condition: state entity_id: sensor.family_status state: Home + - service: input_boolean.turn_on + entity_id: input_boolean.show_time #- service: shell_command.haunted_mansion_preshow_full + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.volume_set data_template: - entity_id: media_player.hass_speaker - volume_level: .7 + entity_id: media_player.ha_speaker + volume_level: .4 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 + #media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 + media_content_id: http://192.168.7.40/audio/haunted_mansion_preshow_short.mp3 media_content_type: "music" - data: entity_id: script.haunted_preshow @@ -358,7 +408,7 @@ script: kill_this_ride: sequence: - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker - service: shell_command.alarm_off - service: script.turn_off data: @@ -408,14 +458,16 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.dance_it + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.volume_set data_template: - entity_id: media_player.hass_speaker - volume_level: .7 + entity_id: media_player.ha_speaker + volume_level: .5 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/move_it_shake_dance_audio.mp3 + media_content_id: http://192.168.7.40/audio/move_it_shake_dance_audio.mp3 media_content_type: "music" spaceship_earth_ride: sequence: @@ -426,14 +478,16 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.spaceship_earth_ride + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.volume_set data_template: - entity_id: media_player.hass_speaker - volume_level: .7 + entity_id: media_player.ha_speaker + volume_level: .5 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: media/audio/spaceship_earth_ride.mp3 + media_content_id: http://192.168.7.40/audio/spaceship_earth_ride.mp3 media_content_type: "music" welcome_to_magic_kingdom: sequence: @@ -480,14 +534,16 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.welcome_show_crowd + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.volume_set data_template: - entity_id: media_player.hass_speaker - volume_level: .7 + entity_id: media_player.ha_speaker + volume_level: .5 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/welcome_show_crowd.mp3 + media_content_id: http://192.168.7.40/audio/welcome_show_crowd.mp3 media_content_type: "music" holiday_wishes_start: sequence: @@ -508,10 +564,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.holiday_wishes + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/wishes_5_min.mp3 + media_content_id: http://192.168.7.40/audio/wishes_5_min.mp3 media_content_type: "music" boo_to_you_show: sequence: @@ -522,10 +580,12 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.boo_to_you + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/boo_to_you_audio.mp3 + media_content_id: http://192.168.7.40/audio/boo_to_you_audio.mp3 media_content_type: "music" happy_ever_after_show: sequence: @@ -536,25 +596,29 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.happily_ever_after + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 - media_content_type: "music" - boo_to_you: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: sensor.family_status - state: Home - #- service: shell_command.boo_to_you - - service: media_player.play_media - entity_id: media_player.hass_speaker - data: - media_content_id: /media/audio/boo_to_you_audio.mp3 + media_content_id: http://192.168.7.40/audio/Happily_Ever_After_Audio.mp3 media_content_type: "music" + # boo_to_you: + # sequence: + # - condition: state + # entity_id: input_boolean.audible_notifications + # state: 'on' + # - condition: state + # entity_id: sensor.family_status + # state: Home + # #- service: shell_command.boo_to_you + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/boo_to_you_audio.mp3 + # media_content_type: "music" tiki_room_audio: sequence: - condition: state @@ -564,33 +628,39 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.tiki_room_audio + - service: media_player.turn_on + entity_id: media_player.ha_speaker + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.volume_set data_template: - entity_id: media_player.hass_speaker - volume_level: .9 + entity_id: media_player.ha_speaker + volume_level: .5 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/tiki_room_audio.mp3 - media_content_type: "music" - happy_ever_after: - sequence: - - condition: state - entity_id: input_boolean.audible_notifications - state: 'on' - - condition: state - entity_id: sensor.family_status - state: Home - #- service: shell_command.happily_ever_after - - service: media_player.volume_set - data_template: - entity_id: media_player.hass_speaker - volume_level: .7 - - service: media_player.play_media - entity_id: media_player.hass_speaker - data: - media_content_id: /media/audio/Happily_Ever_After_Audio.mp3 + media_content_id: http://192.168.7.40/audio/tiki_room_audio.mp3 media_content_type: "music" + # happy_ever_after: + # sequence: + # - condition: state + # entity_id: input_boolean.audible_notifications + # state: 'on' + # - condition: state + # entity_id: sensor.family_status + # state: Home + # #- service: shell_command.happily_ever_after + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.ha_speaker + # volume_level: .5 + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/Happily_Ever_After_Audio.mp3 + # media_content_type: "music" illuminations_lights_out: sequence: - delay: 00:00:57 @@ -635,14 +705,16 @@ script: entity_id: sensor.family_status state: Home #- service: shell_command.illuminations_audio + - service: media_player.turn_on + entity_id: media_player.ha_speaker - service: media_player.volume_set data_template: - entity_id: media_player.hass_speaker - volume_level: .7 + entity_id: media_player.ha_speaker + volume_level: .5 - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.ha_speaker data: - media_content_id: /media/audio/illuminations.mp3 + media_content_id: http://192.168.7.40/audio/illuminations.mp3 media_content_type: "music" - service: script.turn_on entity_id: script.illuminations_preshow diff --git a/packages/notify.yaml b/packages/notify.yaml index 798ffee..bceef9d 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -65,6 +65,7 @@ notify: consumer_secret: !secret twitter_consumer_secret access_token: !secret twitter_access_token access_token_secret: !secret twitter_access_secret + script: @@ -171,17 +172,21 @@ script: - condition: state entity_id: input_boolean.vacation_mode state: 'off' + - service: switch.turn_on + entity_id: switch.ha_speaker - service: tts.google_translate_say data_template: - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv message: > {{ message }} jarvis_alert: sequence: + - service: switch.turn_on + entity_id: switch.ha_speaker - service: tts.amazon_polly_say data_template: - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv message: >- {{ message }} @@ -206,12 +211,14 @@ script: - condition: state entity_id: input_boolean.vacation_mode state: 'off' - - condition: state - entity_id: media_player.hass_speaker + # - service: switch.turn_on + # entity_id: switch.ha_speaker + # - condition: state + entity_id: media_player.guest_tv state: 'idle' - service: tts.google_translate_say data_template: - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv message: > {{message }} @@ -230,21 +237,27 @@ script: - condition: state entity_id: input_boolean.vacation_mode state: 'off' - - service: media_player.turn_on - entity_id: media_player.hass_speaker - - wait_template: >- - {{ not is_state('media_player.hass_speaker', 'playing') }} - - service: media_player.volume_set - data_template: - entity_id: media_player.hass_speaker - volume_level: .65 + # - service: switch.turn_on + # entity_id: switch.ha_speaker + # - service: media_player.turn_on + # entity_id: media_player.guest_tv + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.guest_tv + # volume_level: > + # {% if states.input_boolean.audible_notifications.state == 'on' %} + # .65 + # {% else %} + # .4 + # {% endif %} + # media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker - service: tts.amazon_polly_say data_template: entity_id: > {% if states.input_boolean.audible_notifications.state == 'on' %} - media_player.hass_speaker, media_player.googlehome0715, media_player.googlehomehub3492 + media_player.house {% else %} - media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker + media_player.house {% endif %} message: >- @@ -326,8 +339,10 @@ script: {% macro morning_greeting() %} {{ [ "Time to Rise and Shine. ", "Let's do this thing.", - "Anchorage House." - "The early bird gets the worm. And look over there. A worm. Wait, is that a snake? umm,,,I don't like snakes. Someone might want to take care,, ok,,, moving on.", + "I hope you got some rest.", + "It's time to get the day started.", + "Glad to see everyone made it.", + "The early bird gets the worm. And look over there. A worm.", "The early bird gets the worm.", "from the bridge.", "Pardom the interuption.", @@ -482,8 +497,8 @@ script: {% macro prebed_routine() %} Skylar, {{ [ "It is time to get in the bath. ", - "You only have thirty minutes until bedtime. That means you should be heading for the bathtub." - "I cannot comminicate with the bathtub otherwise I would have started the water for you already, so you will have to do it manually. It's bath time. ", + "You only have thirty minutes until bedtime. That means you should be heading for the bathtub.", + "I cannot comminicate with the bathtub, otherwise, I would have started the water for you already. So you will have to start the bath yourself. ", "My sensors are detecting a strange smell. I am running diagnostics, but in the mean time why don't you start a bath.", ] | random }} If you go now there may be time for stories. Don't forget to brush your teeth. @@ -497,7 +512,7 @@ script: {% macro school_today() %} - {% if is_state("calendar.skylar_school", "on") %} + {% if states.calendar.skylar_school.attributes.offset_reached == True %} Because you have school today! {% if states.calendar.skylar_school.attributes.description == "early-release" %} And guess what? It is early release! diff --git a/packages/presence.yaml b/packages/presence.yaml index b90b264..b848edc 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -204,6 +204,8 @@ automation: - service: script.appliances_on - service: script.standby - service: script.washer_finished_notification_audible + - service: alarm_control_panel.alarm_disarm + entity_id: alarm_control_panel.ah_base_station initial_state: true - id: family_has_left @@ -226,6 +228,8 @@ automation: - service: script.lockdown - service: script.lockdown_issue - service: script.all_fans_off + - service: alarm_control_panel.alarm_arm_away + entity_id: alarm_control_panel.ah_base_station - id: jeff_is_home alias: Jeff is Home @@ -298,10 +302,14 @@ automation: trigger: - platform: state entity_id: - - person.jeffrey - - person.katherine + - device_tracker.jeffreystonesiphone + - device_tracker.katherinestonesiphone from: 'not_home' to: 'home' + condition: + - condition: state + entity_id: sensor.family_status + state: Home action: - service: script.ah_report data_template: diff --git a/packages/security.yaml b/packages/security.yaml index cac2240..ad15980 100755 --- a/packages/security.yaml +++ b/packages/security.yaml @@ -102,6 +102,7 @@ automation: state: "on" action: - service: script.driveway_on + - id: close_garage_lights_out alias: Close Garage at lights out @@ -347,10 +348,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.hass_speaker + # entity_id: media_player.theater # state: 'idle' # - service: tts.google_say - # entity_id: media_player.hass_speaker + # entity_id: media_player.theater # data_template: # message: "Sentry mode activated" @@ -360,10 +361,10 @@ script: # entity_id: input_boolean.audible_notifications # state: 'on' # - condition: state - # entity_id: media_player.hass_speaker + # entity_id: media_player.theater # state: 'idle' # - service: tts.google_say - # entity_id: media_player.hass_speaker + # entity_id: media_player.theater # data_template: # message: "Sentry mode deactivated" diff --git a/packages/sysmon.yaml b/packages/sysmon.yaml index 2e665a6..4a899a1 100755 --- a/packages/sysmon.yaml +++ b/packages/sysmon.yaml @@ -29,9 +29,9 @@ sensor: - 'time_date' - 'time_utc' - 'beat' - - platform: cert_expiry - host: !secret ahsl_base_url - name: SSL Cert Expiration + # - platform: cert_expiry + # host: !secret ahsl_base_url + # name: SSL Cert Expiration - platform: command_line name: "HA Uptime" command: echo "$(($(date +%s) - $(date -d "$(head -n1 /home/homeassistant/.homeassistant/home-assistant.log | cut -d' ' -f-2)" +%s)))" diff --git a/packages/weather_alerts_nws.yaml b/packages/weather_alerts_nws.yaml index 3ed4189..cbcfbc0 100755 --- a/packages/weather_alerts_nws.yaml +++ b/packages/weather_alerts_nws.yaml @@ -200,7 +200,7 @@ automation: to: 'on' action: - service: media_player.play_media - entity_id: media_player.hass_speaker + entity_id: media_player.theater data: media_content_id: /media/audio/Tornado_Siren.mp3 media_content_type: "music" @@ -215,7 +215,7 @@ automation: action: - service: media_player.media_stop - entity_id: media_player.hass_speaker + entity_id: media_player.theater script: diff --git a/scenes.yaml b/scenes.yaml index 5e33343..2623925 100755 --- a/scenes.yaml +++ b/scenes.yaml @@ -136,7 +136,7 @@ state: off group.rgb_lr: state: on - brightness: 40 + brightness_pct: 100 # light.front_door_lamp: # state: on # brightness: 40 @@ -165,31 +165,31 @@ - name: jeff light on entities: - light.master_bedroom_lamp: + light.jeff_lamp: state: on brightness: 100 - name: jeff light off entities: - light.master_bedroom_lamp: + light.jeff_lamp: state: off - name: jeff wake up entities: - light.master_bedroom_lamp: + light.jeff_lamp: state: on brightness: 20 - name: jeff bedtime entities: - light.master_bedroom_lamp: + light.jeff_lamp: state: on brightness: 40 - name: jeff night light entities: - light.master_bedroom_lamp: + light.jeff_lamp: state: on brightness: 10 @@ -241,3 +241,24 @@ # light.front_lamp: # state: on # brightness: 10 + + +######################################### +# Haunted Manshion show scenes +# +# These scenes are used in the Haunted Mansion show that +# takes place when requested + +- name : lr_cool_white + entities: + group.rgb_lr: + state: on + brightness_pct: 100 + rgb_color: [255,255,255] + +- name : lr_blue + entities: + group.rgb_lr: + state: on + brightness_pct: 100 + color_name: "blue" diff --git a/scripts/general.yaml b/scripts/general.yaml index 484af4d..3964274 100644 --- a/scripts/general.yaml +++ b/scripts/general.yaml @@ -121,7 +121,7 @@ driveway_off: state: 'off' - service: switch.turn_off entity_id: switch.driveway_light - - service: switch.turn_off + - service: light.turn_off entity_id: light.side_door_light_3 chromecast_media_stop: sequence: diff --git a/scripts/scripts.yaml b/scripts/scripts.yaml deleted file mode 100644 index 68d6c44..0000000 --- a/scripts/scripts.yaml +++ /dev/null @@ -1,203 +0,0 @@ - - -close_garage: - sequence: - - condition: state - entity_id: cover.cargo_bay - state: open - - service: cover.close_cover - entity_id: cover.cargo_bay -open_garage: - sequence: - - condition: state - entity_id: cover.cargo_bay - state: closed - - service: cover.open_cover - entity_id: cover.cargo_bay - - -tornado_alarm: - sequence: - - service: shell_command.tornado_alarm -sunset_garage_open: - sequence: - - condition: state - entity_id: binary_sensor.ecolink_garage_door_tilt_sensor_sensor - state: 'on' - - service: script.driveway_all_on -jeff_destination_zoo: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Zoo - retain: true -jeff_destination_summit: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Summit - retain: true -jeff_destination_none: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: none - retain: true -jeff_destination_na: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: na - retain: true -jeff_destination_home: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Home - retain: true -jeff_destination_harbins: - sequence: - - service: mqtt.publish - data: - topic: jeff/driving/destination - payload: Harbins - retain: true -kat_destination_na: - sequence: - - service: mqtt.publish - data: - topic: kat/driving/destination - payload: na - retain: true -inside_all_on: - sequence: - - service: light.turn_on - data: - entity_id: light.tower_lamp_4 - - service: light.turn_on - data: - entity_id: light.front_door_lamp - - service: switch.turn_on - data: - entity_id: switch.fireplace_lights - - service: light.turn_on - data: - entity_id: light.living_room_lamp - - service: light.turn_on - data: - entity_id: light.kitchen_light_strip - - service: light.turn_on - data: - entity_id: light.kitchen_cabinets - - service: scene.turn_on - data: - entity_id: scene.livingroom_normal -inside_all_off: - sequence: - - data: - entity_id: light.tower_lamp_4 - service: light.turn_off - - data: - entity_id: light.living_room_lamp - service: light.turn_off - - data: - entity_id: light.front_door_lamp - service: light.turn_off - - data: - entity_id: light.kitchen_cabinets - service: light.turn_off - - data: - entity_id: light.kitchen_cabinet_lights - service: light.turn_off - - entity_id: switch.fireplace_lights - service: switch.turn_off - - entity_id: switch.upstairs - service: switch.turn_off - - entity_id: light.jeff_lamp - service: light.turn_off -all_fans_off: - sequence: - - data: - entity_id: switch.upstairs_fan - service: switch.turn_off - - data: - entity_id: switch.living_room_fan - service: switch.turn_off -family_is_home: - sequence: - - condition: state - entity_id: sensor.family_status - state: Away - - service: mqtt.publish - data: - topic: house/family/status - payload_template: Home - retain: true -family_is_away: - sequence: - - condition: state - entity_id: sensor.family_status - state: Home - - service: mqtt.publish - data: - topic: house/family/status - payload_template: Away - retain: true -driveway_on: - sequence: - - condition: state - entity_id: sun.sun - state: below_horizon - - data: - entity_id: switch.driveway_light - service: switch.turn_on - - data: - entity_id: light.side_door_light_3 - service: light.turn_on -driveway_off: - sequence: - - delay: - seconds: 120 - - condition: state - entity_id: binary_sensor.side_door - state: 'off' - - condition: state - entity_id: binary_sensor.garage_door - state: 'off' - - service: switch.turn_off - entity_id: switch.driveway_light - - service: switch.turn_off - entity_id: light.side_door_light_3 -chromecast_media_stop: - sequence: - - service: media_player.media_stop - data: - entity_id: media_player.theater -appliances_on: - sequence: - - service: switch.turn_on - data: - entity_id: switch.box_fans -appliances_off: - sequence: - - data: - entity_id: switch.box_fans - service: switch.turn_off - - data: - entity_id: switch.incense - service: switch.turn_off - - data: - entity_id: switch.artemis - service: switch.turn_off - - - - - - - diff --git a/sensors/house.yaml b/sensors/house.yaml index 3056eb6..28675e8 100755 --- a/sensors/house.yaml +++ b/sensors/house.yaml @@ -3,7 +3,7 @@ state_topic: "house/washer/status" - platform: history_stats name: Jeff Driving Time - entity_id: sesnor.jeff_driving + entity_id: sensor.jeff_driving state: 'on' type: time end: '{{ now() }}' @@ -11,7 +11,7 @@ days: 7 - platform: history_stats name: Kat Driving Time - entity_id: sesnor.kat_driving + entity_id: sensor.kat_driving state: 'on' type: time end: '{{ now() }}' @@ -19,7 +19,7 @@ days: 7 - platform: history_stats name: Speech time - entity_id: media_player.hass_speaker + entity_id: media_player.guest_tv state: 'playing' type: time end: '{{ now() }}' @@ -65,6 +65,13 @@ - sensor.living_room_temperature - sensor.master_bedroom_temperature - sensor.skylar_room_temperature +- platform: arlo + monitored_conditions: + - captured_today + - last_capture + - total_cameras + - battery_level + - signal_strength - platform: template sensors: sensor_count: From 2859f59da4fa38680dac657ee3321fee889f33cd Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:04:24 -0400 Subject: [PATCH 093/106] Fix sensor so alert would work --- alerts/garage_after_dark.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerts/garage_after_dark.yaml b/alerts/garage_after_dark.yaml index 90cc075..5bf9af5 100755 --- a/alerts/garage_after_dark.yaml +++ b/alerts/garage_after_dark.yaml @@ -1,7 +1,7 @@ garage_after_dark: name: Garage is open...Please Check done_message: Garage is closed - entity_id: input_boolean.garage_after_Dark + entity_id: input_boolean.garage_after_dark state: 'on' repeat: 5 can_acknowledge: false From 9564bcd7478b01df68544cd35e10591a93aec129 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:04:59 -0400 Subject: [PATCH 094/106] Updated switche names --- scenes.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scenes.yaml b/scenes.yaml index 2623925..a03b9df 100755 --- a/scenes.yaml +++ b/scenes.yaml @@ -195,9 +195,9 @@ - name: house party protocol entities: - switch.incense: + switch.incense_3: state: on - switch.artemis: + switch.artemis_2: state: on - name: skylar lamp on From 3cf358cd329c7cf4dc3b0f648f40e1e49d3c2ac5 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:06:32 -0400 Subject: [PATCH 095/106] Moved TPLink to manual config instead of discovery due to inconsitent behaviors. --- configuration.yaml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/configuration.yaml b/configuration.yaml index e0329ab..292c8be 100755 --- a/configuration.yaml +++ b/configuration.yaml @@ -82,7 +82,8 @@ arlo: alarm_control_panel: - platform: arlo - + home_mode_name: home + away_mode_name: armed discovery: ignore: @@ -110,13 +111,9 @@ recorder: logbook: include: domains: - - sensor - - switch - media_player - - light - automation - script - - input_boolean logger: default: warning @@ -160,7 +157,7 @@ camera: media_player: - platform: vlc name: hass_speaker - arguments: '--alsa-audio-device=hw:0,0' + arguments: '--alsa-audio-device=hw:1,0' ffmpeg: ffmpeg_bin: /usr/bin/ffmpeg @@ -226,8 +223,11 @@ wwlln: longitude: !secret MY_LONGITUDE tplink: - discovery: true - + discovery: false + switch: + - host: 192.168.7.105 + - host: 192.168.7.107 + # zwave: # usb_path: /dev/ttyACM0 # network_key: !secret zwave_key @@ -255,7 +255,10 @@ shell_command: happily_ever_after: mpg123 /media/audio/Happily_Ever_After_Audio.mp3 boo_to_you: mpg123 /media/audio/boo_to_you_audio.mp3 haunted_mansion_ride: mpg123 /media/audio/haunted_mansion_ride.mp3 - wishes_preshow: mpg123 /media/audio/wishes_5_min.mp3 + holiday_wishes_preshow: mpg123 /media/audio/wishes_5_min.mp3 + holiday_wishes: mpg123 /media/audio/holidaywishes.mp3 + disney_springs_xmas: mpg123 /media/audio/disney_springs_xmas.mp3 + american_adventure: mpg123 /media/audio/The_American_Adventure.mp3 welcome_show: mpg123 /media/audio/welcome_show.mp3 monorail_waiting: mpg123 /media/audio/monorail_waiting.mp3 monorail_mk: mpg123 /media/audio/monorail.mp3 @@ -266,6 +269,9 @@ shell_command: dance_it: mpg123 /media/audio/move_it_shake_dance_audio.mp3 hass_vol_up: sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')+5]% hass_vol_dn: sudo amixer set PCM -- $[$(amixer get PCM|grep -o [0-9]*%|sed 's/%//')-5]% + normal_vol: amixer -c 0 set PCM 93% + tiki_vol: amixer -c 0 set PCM 95% + full_vol: amixer -c 0 set PCM 100% reset_alexa_cookie: /home/homeassistant/bin/resetalexacookie tiki_room_audio: mpg123 /media/audio/tiki_room_audio.mp3 illuminations_audio: mpg123 /media/audio/illuminations.mp3 From ace65a4e82e54d1e907635c5075c780c8aa1bfa1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:06:49 -0400 Subject: [PATCH 096/106] Added twets for Halloween --- packages/twitter.yaml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/packages/twitter.yaml b/packages/twitter.yaml index 31f5432..e8b64ac 100755 --- a/packages/twitter.yaml +++ b/packages/twitter.yaml @@ -84,11 +84,11 @@ automation: - service: script.twitter_notify data_template: message: '{{ [ "According to my latest speed tests Anchorage House is getting - {{ states.sensor.internet_test_down_mean.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up_mean.attributes.max_value }} + {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }} Mbps up thanks to #ATTFiber. ", "How fast is your internet? I just checked - am Im seeing {{ states.sensor.internet_test_down_mean.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up_mean.attributes.max_value }} + am Im seeing {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }} Mbps up. Beat that. ", "My speed is monitored using @home_assistant and https://github.com/thejeffreystone/speedtest_to_mqtt - and is {{ states.sensor.internet_test_down_mean.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up_mean.attributes.max_value }} + and is {{ states.sensor.internet_test_down.attributes.max_value }} Mbps down and {{ states.sensor.internet_test_up.attributes.max_value }} Mbps up." ] | random }}' - id: rex_manning_day_tweet_1 @@ -136,3 +136,30 @@ automation: data_template: message: >- "We mustn't dwell. No, not today. We can't. Not on Rex Manning day! https://www.youtube.com/watch?v=szvt8iWJ0oo #damntheman #savetheempire" + + - id: Halloween Tweet + alias: Halloween Tweet + initial_state: true + trigger: + - platform: time + at: '13:00:00' + condition: + - condition: template + value_template: > + {% set month= now().month | int %} + {%- if month == 10 -%} + true + {%- endif -%} + action: + - delay: '0{{ (range(1, 5)|random|int) }}:{{ range(0,5) | random | int }}{{ range(0,9) | random | int }}:00' + - service: script.twitter_notify + data_template: + message: '{{ [ "There are only {{states.sensor.holiday_halloween.state}} days until Halloween.", + "Halloween is only {{states.sensor.holiday_halloween.state}} days away. It might not be enough time. ", + "Halloween is coming. {{states.sensor.holiday_halloween.state}} days and counting.", + "Only {{states.sensor.holiday_halloween.state}} days until Halloween.", + "You have {{states.sensor.holiday_halloween.state}} days until you need a costume.", + "Only {{states.sensor.holiday_halloween.state}} days until Halloween. But who is counting. amirite?", + "Would it be cliche if I went as a haunted house for Halloween? Asking for a another house.", + "Just in case I wanted to be HAL 9000 for Halloween I ordered some Pod Bay Doors." + ] | random }}' From 896db171c9e5279aec7101409883472316f7ba72 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:07:16 -0400 Subject: [PATCH 097/106] Updated presence detection and added one for school --- packages/presence.yaml | 64 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/packages/presence.yaml b/packages/presence.yaml index b848edc..997ba80 100755 --- a/packages/presence.yaml +++ b/packages/presence.yaml @@ -54,8 +54,14 @@ sensor: friendly_name: "Skylar's Current Location" unit_of_measurement: '' value_template: >- - {%- if is_state('person.jeffrey', 'home') and is_state('person.jeffrey', 'home')%} + {%- if is_state('input_boolean.skylar_school', 'on')%} + school + {%- elif is_state('sensor.jeff_location', 'home') and is_state('sensor.kat_location', 'home') and is_state('input_boolean.skylar_school', 'off')%} home + {%- elif is_state('sensor.jeff_location', 'Summit') and is_state('input_boolean.skylar_school', 'off')%} + {{ states.sensor.kat_location.state }} + {%- elif is_state('sensor.kat_location', 'Zoo Atlanta') and is_state('input_boolean.skylar_school', 'off')%} + {{ states.sensor.jeff_location.state }} {% else %} Mortal Peril {%- endif %} @@ -180,6 +186,58 @@ automation: call_interurption: 1 call_jeff_headed_home: 1 + - id: skylar_at_school + alias: Skylar is at School + trigger: + - entity_id: device_tracker.life360_jeffrey_stone + event: enter + platform: zone + zone: zone.starling + - entity_id: device_tracker.life360_kat_stone + event: enter + platform: zone + zone: zone.starling + condition: + condition: time + after: '07:45:00' + before: '08:30:00' + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: input_boolean.turn_on + entity_id: input_boolean.skylar_school + initial_state: true + + - id: skylar_left_school + alias: Skylar left School + trigger: + - entity_id: device_tracker.life360_jeffrey_stone + event: leave + platform: zone + zone: zone.starling + - entity_id: device_tracker.life360_kat_stone + event: leave + platform: zone + zone: zone.starling + condition: + condition: time + after: '14:45:00' + before: '15:30:00' + weekday: + - mon + - tue + - wed + - thu + - fri + action: + - service: input_boolean.turn_off + entity_id: input_boolean.skylar_school + initial_state: true + - id: family_has_arrived alias: Family Has arrived trigger: @@ -204,7 +262,7 @@ automation: - service: script.appliances_on - service: script.standby - service: script.washer_finished_notification_audible - - service: alarm_control_panel.alarm_disarm + - service: alarm_control_panel.alarm_arm_home entity_id: alarm_control_panel.ah_base_station initial_state: true @@ -377,4 +435,4 @@ script: data: topic: kat/driving/destination payload: na - retain: true \ No newline at end of file + retain: true From a898551ba15afd4e7faafe522d133b40ca4373ad Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:08:02 -0400 Subject: [PATCH 098/106] Moved back to main house speaker for TTS --- packages/notify.yaml | 45 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/packages/notify.yaml b/packages/notify.yaml index bceef9d..ac8133e 100755 --- a/packages/notify.yaml +++ b/packages/notify.yaml @@ -214,8 +214,8 @@ script: # - service: switch.turn_on # entity_id: switch.ha_speaker # - condition: state - entity_id: media_player.guest_tv - state: 'idle' + # entity_id: media_player.guest_tv + # state: 'idle' - service: tts.google_translate_say data_template: entity_id: media_player.guest_tv @@ -237,30 +237,31 @@ script: - condition: state entity_id: input_boolean.vacation_mode state: 'off' - # - service: switch.turn_on - # entity_id: switch.ha_speaker - # - service: media_player.turn_on - # entity_id: media_player.guest_tv - # - service: media_player.volume_set - # data_template: - # entity_id: media_player.guest_tv - # volume_level: > - # {% if states.input_boolean.audible_notifications.state == 'on' %} - # .65 - # {% else %} - # .4 - # {% endif %} + - service: switch.turn_on + entity_id: switch.ha_speaker + - service: media_player.turn_on + entity_id: media_player.theater + - service: media_player.volume_set + data_template: + entity_id: media_player.theater + volume_level: > + {% if states.input_boolean.audible_notifications.state == 'on' %} + .65 + {% else %} + .4 + {% endif %} # media_player.googlehome0715, media_player.googlehomehub3492, media_player.upstairs_speaker - service: tts.amazon_polly_say data_template: entity_id: > {% if states.input_boolean.audible_notifications.state == 'on' %} - media_player.house + media_player.theater {% else %} media_player.house {% endif %} message: >- + {{ message }} @@ -465,14 +466,16 @@ script: "I'll be going as HAL 9000. The Pod Bay Doors are being installed today." ] | random }} {% elif states.sensor.holiday_halloween.state | int < 30 %} - {{ [ "There are only {{states.sensor.holiday_halloween.state}} days until Halloween.", - "Halloween is only {{states.sensor.holiday_halloween.state}} days away. It might not be enough time. ", - "Halloween is coming. {{states.sensor.holiday_halloween.state}} days and counting.", - "Only {{states.sensor.holiday_halloween.state}} days until Halloween.", - "You have {{states.sensor.holiday_halloween.state}} days until you need a costume." + There are only {{states.sensor.holiday_halloween.state}} days + {{ [ "until Halloween.", + "until Halloween. It might not be enough time. ", + "and counting until the best holiday ever.", + "until you need a costume." ] | random }} + {% else %} {% endif %} + {% if states.sensor.holiday_christmas.state | int == 1 %} Tomorrow is Christmas. It's practically here! Santa is coming tonight! Don't forget the cookies! {% elif states.sensor.holiday_christmas.state | int < 25 %} From 7a4be2272376ec81a1d74c0eb8a03ecf7c385ce7 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:09:45 -0400 Subject: [PATCH 099/106] Updated speach sensor --- sensors/house.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sensors/house.yaml b/sensors/house.yaml index 28675e8..736a194 100755 --- a/sensors/house.yaml +++ b/sensors/house.yaml @@ -19,7 +19,7 @@ days: 7 - platform: history_stats name: Speech time - entity_id: media_player.guest_tv + entity_id: media_player.theater state: 'playing' type: time end: '{{ now() }}' From 578525b6a6e98d3b4431280dd86faa4c6768e046 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:10:59 -0400 Subject: [PATCH 100/106] Input boolean for school presence --- input_boolean.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/input_boolean.yaml b/input_boolean.yaml index 4bd1f32..754ce8c 100755 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -79,6 +79,8 @@ new_ha_announcement: showing_now: name: Showing Now icon: mdi:popcorn +skylar_school: + name: Skylar at School ##################### From 0d773395a3c37354194d28799286c8cdd27a77cd Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:11:22 -0400 Subject: [PATCH 101/106] Fixed Haunted Mansion light effects --- packages/disney.yaml | 390 ++++++++++++++++++++++++++++++------------- 1 file changed, 271 insertions(+), 119 deletions(-) diff --git a/packages/disney.yaml b/packages/disney.yaml index 3e15a61..a24d3a0 100755 --- a/packages/disney.yaml +++ b/packages/disney.yaml @@ -26,6 +26,14 @@ input_boolean: name: Tiki Room illuminations: name: Illuminations + move_shake_dance: + name: Move It Shake It Dance It + welcome_show: + name: Welcome Show + american_adventure: + name: American Adventure + disney_springs_xmas: + name: Disney Springs XMas automation: - id: mk_loop_on @@ -223,7 +231,8 @@ automation: entity_id: script.kill_this_ride - service: media_player.media_stop entity_id: media_player.ha_speaker - - id: holiday_wisher_on + + - id: holiday_wishes_on alias: Holiday Wishes On initial_state: true trigger: @@ -232,7 +241,7 @@ automation: to: 'on' action: - service: script.turn_on - entity_id: script.holiday_wishes_start + entity_id: script.holiday_wishes - id: holiday_wishes_off alias: Holiday Wishes Off initial_state: true @@ -246,6 +255,99 @@ automation: - service: media_player.media_stop entity_id: media_player.ha_speaker + - id: welcome_show_on + alias: Welcome Show On + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.welcome_show + to: 'on' + action: + - service: script.turn_on + entity_id: script.welcome_show_audio + - id: welcome_show_off + alias: Welcome Show Off + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.welcome_show + to: 'off' + action: + - service: script.turn_on + entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.ha_speaker + + - id: american_adventure_on + alias: American Adventure On + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.american_adventure + to: 'on' + action: + - service: script.turn_on + entity_id: script.american_adventure + - id: american_adventure_off + alias: American Adventure Off + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.american_adventure + to: 'off' + action: + - service: script.turn_on + entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.ha_speaker + + - id: springs_christmas_on + alias: Disney Springs XMas On + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.disney_springs_xmas + to: 'on' + action: + - service: script.turn_on + entity_id: script.disney_springs_xmas + - id: springs_christmas_off + alias: Disney Springs XMas Off + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.disney_springs_xmas + to: 'off' + action: + - service: script.turn_on + entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.ha_speaker + + - id: move_dance_on + alias: Move It Shake It On + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.move_shake_dance + to: 'on' + action: + - service: script.turn_on + entity_id: script.move_it_shake_it + - id: move_dance_off + alias: Move It Shake It Off + initial_state: true + trigger: + - platform: state + entity_id: input_boolean.move_shake_dance + to: 'off' + action: + - service: script.turn_on + entity_id: script.kill_this_ride + - service: media_player.media_stop + entity_id: media_player.ha_speaker + + - id: kill_show alias: Kill Show trigger: @@ -259,6 +361,12 @@ automation: - script.tiki_room_audio - script.mk_loop - script.spaceship_earth_ride + - script.welcome_show_audio + - script.move_it_shake_it + - script.holiday_wishes_start + - script.holiday_wishes + - script.american_adventure + - script.disney_springs_xmas from: 'on' to: 'off' action: @@ -345,33 +453,41 @@ script: - condition: state entity_id: sensor.family_status state: Home - - service: input_boolean.turn_on - entity_id: input_boolean.show_time - #- service: shell_command.haunted_mansion_preshow_full - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.volume_set - data_template: - entity_id: media_player.ha_speaker - volume_level: .4 - - service: media_player.play_media - entity_id: media_player.ha_speaker + - service: shell_command.normal_vol + - service: shell_command.haunted_mansion_preshow_full + - service: light.turn_on + entity_id: group.rgb_lr data: - #media_content_id: /media/audio/haunted_mansion_preshow_full.mp3 - media_content_id: http://192.168.7.40/audio/haunted_mansion_preshow_short.mp3 - media_content_type: "music" - - data: - entity_id: script.haunted_preshow - service: script.turn_on - - data: - entity_id: script.haunted_lights_out - service: script.turn_on - - data: - entity_id: script.haunted_lights_on - service: script.turn_on - - data: - entity_id: script.house_lights_on - service: script.turn_on + rgb_color: [255,255,255] + - delay: 00:01:06 + - service: light.turn_on + entity_id: group.rgb_lr + data: + rgb_color: [73,119,255] + - delay: 00:00:15 + - service: light.turn_on + entity_id: group.rgb_lr + data: + brightness_pct: 25 + - delay: 00:00:37 + - service: switch.turn_on + entity_id: switch.rail_lights + - service: switch.turn_off + entity_id: switch.rail_lights + - delay: 00:00:02 + - service: scene.turn_on + data: + entity_id: scene.haunted_lights_out + - service: switch.turn_on + entity_id: switch.rail_lights + - service: switch.turn_off + entity_id: switch.rail_lights + - delay: 00:00:10 + - service: light.turn_on + entity_id: group.rgb_lr + data: + rgb_color: [255,255,255] + brightness_pct: 25 kill_haunted_mansion: sequence: - service: shell_command.alarm_off @@ -449,6 +565,21 @@ script: entity_id: script.illuminations_triple_light - service: script.turn_off entity_id: script.illuminations_show + - service: script.turn_off + entity_id: script.haunted_mansion_start + - service: script.turn_off + entity_id: script.welcome_show_audio + - service: script.turn_off + entity_id: script.move_it_shake_it + - service: script.turn_off + entity_id: script.holiday_wishes_start + - service: script.turn_off + entity_id: script.holiday_wishes + - service: script.turn_off + entity_id: script.american_adventure + - service: script.turn_off + entity_id: script.disney_springs_xmas + - service: shell_command.normal_vol move_it_shake_it: sequence: - condition: state @@ -457,18 +588,36 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.dance_it - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.volume_set - data_template: - entity_id: media_player.ha_speaker - volume_level: .5 - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/move_it_shake_dance_audio.mp3 - media_content_type: "music" + - service: shell_command.dance_it + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.ha_speaker + # volume_level: .5 + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/move_it_shake_dance_audio.mp3 + # media_content_type: "music" + american_adventure: + sequence: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - condition: state + entity_id: sensor.family_status + state: Home + - service: shell_command.american_adventure + disney_springs_xmas: + sequence: + - condition: state + entity_id: input_boolean.audible_notifications + state: 'on' + - condition: state + entity_id: sensor.family_status + state: Home + - service: shell_command.disney_springs_xmas spaceship_earth_ride: sequence: - condition: state @@ -477,18 +626,18 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.spaceship_earth_ride - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.volume_set - data_template: - entity_id: media_player.ha_speaker - volume_level: .5 - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/spaceship_earth_ride.mp3 - media_content_type: "music" + - service: shell_command.spaceship_earth_ride + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.ha_speaker + # volume_level: .5 + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/spaceship_earth_ride.mp3 + # media_content_type: "music" welcome_to_magic_kingdom: sequence: - condition: state @@ -533,28 +682,30 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.welcome_show_crowd - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.volume_set - data_template: - entity_id: media_player.ha_speaker - volume_level: .5 - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/welcome_show_crowd.mp3 - media_content_type: "music" - holiday_wishes_start: + - service: shell_command.welcome_show + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.ha_speaker + # volume_level: .5 + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/welcome_show_crowd.mp3 + # media_content_type: "music" + holiday_wishes_preshow: sequence: - condition: state entity_id: input_boolean.audible_notifications state: 'on' - condition: state - entity_id: group.family - state: 'on' - - service: shell_command.wishes_preshow - - service: script.holiday_wishes + entity_id: sensor.family_status + state: Home + - service: shell_command.holiday_wishes_preshow + - delay: '00:04:00' + - service: input_boolean.turn_on + entity_id: input_boolean.holiday_wishes holiday_wishes: sequence: - condition: state @@ -563,14 +714,14 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.holiday_wishes - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/wishes_5_min.mp3 - media_content_type: "music" + - service: shell_command.holiday_wishes + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/wishes_5_min.mp3 + # media_content_type: "music" boo_to_you_show: sequence: - condition: state @@ -579,14 +730,14 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.boo_to_you - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/boo_to_you_audio.mp3 - media_content_type: "music" + - service: shell_command.boo_to_you + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/boo_to_you_audio.mp3 + # media_content_type: "music" happy_ever_after_show: sequence: - condition: state @@ -595,14 +746,14 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.happily_ever_after - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/Happily_Ever_After_Audio.mp3 - media_content_type: "music" + - service: shell_command.happily_ever_after + # - service: media_player.turn_on + # entity_id: media_player.hass_speaker + # - service: media_player.play_media + # entity_id: media_player.hass_speaker + # data: + # media_content_id: http://192.168.7.40/audio/Happily_Ever_After_Audio.mp3 + # media_content_type: "music" # boo_to_you: # sequence: # - condition: state @@ -627,20 +778,21 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.tiki_room_audio - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.volume_set - data_template: - entity_id: media_player.ha_speaker - volume_level: .5 - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/tiki_room_audio.mp3 - media_content_type: "music" + - service: shell_command.tiki_vol + - service: shell_command.tiki_room_audio + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.ha_speaker + # volume_level: .5 + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/tiki_room_audio.mp3 + # media_content_type: "music" # happy_ever_after: # sequence: # - condition: state @@ -704,18 +856,18 @@ script: - condition: state entity_id: sensor.family_status state: Home - #- service: shell_command.illuminations_audio - - service: media_player.turn_on - entity_id: media_player.ha_speaker - - service: media_player.volume_set - data_template: - entity_id: media_player.ha_speaker - volume_level: .5 - - service: media_player.play_media - entity_id: media_player.ha_speaker - data: - media_content_id: http://192.168.7.40/audio/illuminations.mp3 - media_content_type: "music" + - service: shell_command.illuminations_audio + # - service: media_player.turn_on + # entity_id: media_player.ha_speaker + # - service: media_player.volume_set + # data_template: + # entity_id: media_player.ha_speaker + # volume_level: .5 + # - service: media_player.play_media + # entity_id: media_player.ha_speaker + # data: + # media_content_id: http://192.168.7.40/audio/illuminations.mp3 + # media_content_type: "music" - service: script.turn_on entity_id: script.illuminations_preshow - service: script.turn_on From 9daed710441b97c938141d000c5a70caa321cc8c Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:11:58 -0400 Subject: [PATCH 102/106] Added Arlo mode changes based on presence --- automations.yaml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/automations.yaml b/automations.yaml index 4f3f95e..ec05f9f 100755 --- a/automations.yaml +++ b/automations.yaml @@ -1,7 +1,7 @@ - id: washer_running alias: Washer Running trigger: - - above: 10 + - above: 5 entity_id: sensor.washer platform: numeric_state action: @@ -100,6 +100,8 @@ entity_id: scene.diminshed_livingroom_lighting - service: scene.turn_on entity_id: scene.diminished_kitchen_lighting + - service: alarm_control_panel.alarm_arm_home + entity_id: alarm_control_panel.ah_base_station - id: good_morning alias: Good Morning @@ -147,6 +149,8 @@ entity_id: switch.rainbow_light_3 - service: light.turn_on entity_id: light.table_lamp_2 + - service: alarm_control_panel.alarm_arm_away + entity_id: alarm_control_panel.ah_base_station - id: jeff_lights_out alias: Jeff lights out initial_state: true @@ -298,7 +302,7 @@ lights. ", "I see the sun! Time to turn off the outside lights at Anchorage House. ", "Dawn has broken at Anchorage House. Turning off the outside lights. " ] | random }}' - - service: alarm_control_panel.alarm_disarm + - service: alarm_control_panel.alarm_arm_home entity_id: alarm_control_panel.ah_base_station - id: inside_on_sunset @@ -497,7 +501,7 @@ platform: time condition: - condition: state - entity_id: binary_sensor.garage_door + entity_id: binary_sensor.garage_door_contact_2 state: 'on' action: - data: @@ -507,7 +511,7 @@ alias: Garage Closed initial_state: true trigger: - - entity_id: binary_sensor.garage_door + - entity_id: binary_sensor.garage_door_contact_2 from: 'on' platform: state to: 'off' @@ -544,6 +548,9 @@ - condition: state entity_id: switch.upstairs_fan state: 'on' + - condition: state + entity_id: media_player.tsr_6750_a3ed2f + state: 'on' action: - data: entity_id: switch.upstairs_fan @@ -588,12 +595,14 @@ alias: Turn Off HA Speaker trigger: - platform: state - entity_id: media_player.guest_tv + entity_id: media_player.theater from: 'playing' to: 'idle' action: - service: switch.turn_off entity_id: switch.ha_speaker + - service: media_player.turn_off + entity_id: media_player.theater initial_state: true ########################## @@ -604,7 +613,8 @@ initial_state: true trigger: - platform: state - entity_id: updater.updater + entity_id: binary_sensor.updater + to: 'on' action: - service: input_boolean.turn_on entity_id: input_boolean.new_ha_announcement From cbc93c20ca1a63960204fc1f8d0c0a7e3696b7f0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:12:56 -0400 Subject: [PATCH 103/106] Updated incense warmer switches/outlets entities --- scripts/general.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/general.yaml b/scripts/general.yaml index 3964274..756619e 100644 --- a/scripts/general.yaml +++ b/scripts/general.yaml @@ -139,10 +139,10 @@ appliances_off: entity_id: switch.box_fans service: switch.turn_off - data: - entity_id: switch.incense + entity_id: switch.incense_3 service: switch.turn_off - data: - entity_id: switch.artemis + entity_id: switch.artemis_2 service: switch.turn_off From 26527ec25c5a1e6f26cdc8619b56667146bbc6cd Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sat, 5 Oct 2019 20:42:30 -0400 Subject: [PATCH 104/106] Just cleaned up the code thanks to @burnshomeautomation and @CCOSTAN --- sensors/house.yaml | 90 ++++++++-------------------------------------- 1 file changed, 14 insertions(+), 76 deletions(-) diff --git a/sensors/house.yaml b/sensors/house.yaml index 736a194..c8ff8cc 100755 --- a/sensors/house.yaml +++ b/sensors/house.yaml @@ -77,97 +77,35 @@ sensor_count: friendly_name: 'Number of Sensors' entity_id: [] - value_template: > - {%- set domains = ['sensor'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} + value_template: >- + {{ states.sensor | list | count }} automation_count: friendly_name: 'Number of Automations' entity_id: [] - value_template: > - {%- set domains = ['automation'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} + value_template: >- + {{ states.automation| list | count }} script_count: friendly_name: 'Number of Scripts' entity_id: [] - value_template: > - {%- set domains = ['script'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} + value_template: >- + {{ states.script | list | count }} binary_sensor_count: friendly_name: 'Number of Binary Sensors' entity_id: [] - value_template: > - {%- set domains = ['binary_sensor'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} + value_template: >- + {{ states.binary_sensor | list | count }} tracker_count: friendly_name: 'Number of Devices' entity_id: [] - value_template: > - {%- set domains = ['device_tracker'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} + value_template: >- + {{ states.device_tracker| list | count }} lights_count: friendly_name: 'Number of Lights' entity_id: [] - value_template: > - {%- set domains = ['light'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} - protect_count: - friendly_name: 'Number of Smoke Detectors' - entity_id: [] - value_template: > - {% if states('group.protects') == 'on' %} - {% for e in states.group.protects.attributes.entity_id if states(e) == 'on' %} - {% if loop.last %} - {{ loop.index }} - {% endif %} - {%- endfor -%} - {% else %} - 0 - {% endif %} + value_template: >- + {{ states.light | list | count }} camera_count: friendly_name: 'Number of online Cameras' entity_id: [] - value_template: > - {%- set domains = ['camera'] -%} - {%- for domain in domains -%} - {%- for item in states[domain] -%} - {% if loop.first %} - {{loop.length}} - {% endif %} - {%- endfor -%} - {%- endfor -%} + value_template: >- + {{ states.camera | list | count }} From d110658a715523a48e21e277b7d2de375d39cc43 Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sun, 6 Oct 2019 12:56:33 -0400 Subject: [PATCH 105/106] Python script powering the special event / countdown sensors --- python_scripts/special_events.py | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 python_scripts/special_events.py diff --git a/python_scripts/special_events.py b/python_scripts/special_events.py new file mode 100644 index 0000000..d9657db --- /dev/null +++ b/python_scripts/special_events.py @@ -0,0 +1,39 @@ +today = datetime.datetime.now().date() + +name = data.get('name') +type = data.get('type') +sensorName = "sensor.{}_{}".format(type , name.replace(" " , "_")) + +dateStr = data.get('date') +dateSplit = dateStr.split("/") + +dateDay = int(dateSplit[0]) +dateMonth = int(dateSplit[1]) +dateYear = int(dateSplit[2]) +date = datetime.date(dateYear,dateMonth,dateDay) + +thisYear = today.year +nextOccur = datetime.date(thisYear , dateMonth , dateDay) + +numberOfDays = 0 +years = int(thisYear) - dateYear + + +if today < nextOccur: + numberOfDays = (nextOccur - today).days + +elif today > nextOccur: + nextOccur = datetime.date(thisYear+1 , dateMonth , dateDay) + numberOfDays = int((nextOccur - today).days) + years = years+1 + + +hass.states.set(sensorName , numberOfDays , + { + "icon" : "mdi:calendar-star" , + "unit_of_measurement" : "days" , + "friendly_name" : "{}'s {}".format(name, type) , + "years" : years + } +) + From ab6f088ad3030687dcc6790c71d99f3545d759ba Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Sun, 6 Oct 2019 13:15:37 -0400 Subject: [PATCH 106/106] oops --- packages/events.yaml | 61 -------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100755 packages/events.yaml diff --git a/packages/events.yaml b/packages/events.yaml deleted file mode 100755 index 6cad129..0000000 --- a/packages/events.yaml +++ /dev/null @@ -1,61 +0,0 @@ -############################################################################### -# @author : Jeffrey Stone -# @date : 02/19/2019 -# @package : Events -# @description : Special Events. -############################################################################### -automation: - - id: refresh_special_event_sensors - alias: Refresh special event sensors - initial_state: true - trigger: - - platform: time - at: '00:00:01' - - platform: homeassistant - event: start - action: - - service: python_script.special_events - data: - name: Skylar - type: birthday - date: 26/02/2014 - - service: python_script.special_events - data: - name: Jeff - type: birthday - date: 02/09/1975 - - service: python_script.special_events - data: - name: Kat - type: birthday - date: 18/09/1978 - - service: python_script.special_events - data: - name: Our wedding - type: anniversary - date: 28/04/2001 - - service: python_script.special_events - data: - name: Christmas - type: holiday - date: 25/12/2001 - - service: python_script.special_events - data: - name: Halloween - type: holiday - date: 31/10/2001 - - service: python_script.special_events - data: - name: Roadtrip - type: trip - date: 30/08/2019 - - service: python_script.special_events - data: - name: Disney World - type: trip - date: 01/02/2020 - - service: python_script.special_events - data: - name: Camping - type: trip - date: 09/10/2019 \ No newline at end of file

+ Anchorage House HA +
+ Anchorage House - [Home Assistant](https://home-assistant.io/) Configuration +