├── .gitignore
├── 2021-10-5_Home_Assistant_Integrations_Youre_Not_Using
├── README.md
├── automations.yaml
├── binary_sensors.yaml
├── configuration.yaml
├── scenes.yaml
├── scripts.yaml
├── secrets.yaml
└── sensors.yaml
├── 2022-04-HA_101-RemoteAccess
├── README.md
├── automations.yaml
├── configuration.yaml
├── scenes.yaml
├── scripts.yaml
└── secrets.yaml
├── 2022-04-Home_Assistant_Alerts.zip
├── 2022-04-Home_Assistant_Alerts
├── README.md
├── alerts.yaml
├── automations.yaml
├── configuration.yaml
├── scenes.yaml
├── scripts.yaml
└── secrets.yaml
├── 2022-05-Jarvis_Echo
├── README.md
├── automations.yaml
├── configuration.yaml
├── packages
│ └── jarvis.yaml
├── scenes.yaml
├── scripts.yaml
└── secrets.yaml
├── 2022-05-Jarvis_Recall
├── README.md
├── automations.yaml
├── configuration.yaml
├── packages
│ └── notifications.yaml
├── scenes.yaml
├── scripts.yaml
└── secrets.yaml
├── 2022-09-LumaryLights
├── README.md
├── automations.yaml
├── configuration.yaml
├── packages
│ └── notifications.yaml
├── scenes.yaml
└── secrets.yaml
├── 2022-09-MQTTErrors
├── README.md
├── configuration.yaml
├── mqtt.yaml
├── packages
│ └── notifications.yaml
└── secrets.yaml
├── 2022-10-AutomatingTimers
├── README.md
├── automations.yaml
├── configuration.yaml
└── secrets.yaml
├── 2023-MasterTemplates_StateBasedEntities
├── README.md
├── configuration.yaml
├── script.yaml
└── template.yaml
├── 2023-ResponseVariables
├── README.md
├── automations.yaml
├── configuration.yaml
├── scripts.yaml
└── secrets.yaml
├── 2024-LocalVoiceConfig
├── README.md
├── automations.yaml
└── configuration.yaml
├── README.md
└── images
├── slacker_labs.png
└── videos
├── 2024-JarvisLocalSpeaker.png
├── tn-2022-AutomatingTimers2.png
├── tn-2022-MQTTErrors.png
├── tn-2023-TemplatesEntities.png
├── tn-2023-response_variables3.png
├── tn-5integrations.png
├── tn-Alerts.png
├── tn-LumaryReview.png
├── tn-RecallSystem.jpg
├── tn-RemoteAccess.png
└── tn-confession.png
/.gitignore:
--------------------------------------------------------------------------------
1 | # ignore my git update script
2 | update_git.py
3 |
4 | # ignore some directories.
5 | /init
6 | /.vscode
7 |
8 | # ignore any of these files no matter where they are using double *
9 | **.DS_Store
10 | **._*
11 | **settings.json
12 | **.HA_VERSION
13 | **.pyc
14 | **.conf
15 | **.uuid
16 | **.txt
17 | **.log
18 | **.db
19 | **.sqlite
20 | **.xml
21 | **known_devices.yaml
22 | **google_calendars.yaml
23 | **ip_bans.yaml
24 | **.spotify-token-cache
25 | **zones.yaml
26 | **test.yaml
27 | **testing.yaml
28 | **.homekit*
29 | **.vscode
30 | **.pid
31 | **.xml
32 | **.csr
33 | **.crt
34 | **.key
35 | **core.*
36 | **OZW_Log.txt
37 | **home-assistant.log*
38 | **home-assistant_v2*
39 | **.db-journal
40 | **.db-shm
41 | **.db-wal
42 | **.sqlite
43 | **__pycache__
44 | **phue.conf
45 | **ios.conf
46 | **pyozw.sqlite
47 | **ipchange.yaml
48 | **production_auth.json
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Home Assistant Integrations You're Not Using
4 |
5 |
6 | [](https://youtu.be/QZB_o62AuV0)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **configuration.yaml**
14 |
15 | Contains links to binary sensors, sensors, and has the utility meter configuration
16 |
17 | **binary_sensors.yaml**
18 |
19 | Contains Workday and Times of Day (tod) sensors
20 |
21 | **automations.yaml**
22 |
23 | Contains example Automations for setting an input_datetime automagically, and an automation using that input_datetime as a trigger
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/automations.yaml:
--------------------------------------------------------------------------------
1 | #
2 | #
3 | #
4 | # Use this automation to change an input datetime based on certain conditions.
5 | # For example, in this case we use a google calendar event to tell us if its
6 | # a school day. And if it is then we set good morning time to 6:45.
7 | # If its not but it a workday, then set it to 7:30.
8 | # And if none of those then 7:30.
9 | - id: bd8e4e20-f138-49ec-a9f6-d23ab1450b98
10 | alias: set good morning time
11 | trigger:
12 | - platform: time
13 | at: '05:55:00' # this runs every day at 5:55 am
14 | action:
15 | - service: input_datetime.set_datetime
16 | entity_id: input_datetime.good_morning
17 | data_template:
18 | time: >
19 | {% if is_state_attr('calendar.skylar_school', 'offset_reached',True) %}
20 | 06:45
21 | {% elif is_state('binary_sensor.workday_sensor.state','on') %}
22 | 07:00
23 | {% else %}
24 | 07:30
25 | {% endif %}
26 |
27 | #
28 | # Then we can use that input datetime to trigger our automation:
29 | - id: ce3d7e63-3eaa-4cc5-959b-1334e6c5c4e6
30 | alias: Good Morning
31 | initial_state: true
32 | trigger:
33 | platform: time
34 | at: input_datetime.good_morning # Our input date time as a trigger
35 | action:
36 | - service: scene.turn_on
37 | entity_id: scene.normal_livingroom_lighting # activate living room lights.
38 | - service: scene.turn_on
39 | entity_id: scene.normal_kitchen_lighting # turn on kitchen lighting.
40 | - service: scene.turn_on
41 | entity_id: scene.jeff_light_on
42 | - service: script.twitter_notify_image # and tweet about our day
43 | data_template:
44 | tweet: >-
45 | {{ [
46 | "Good Morning! Time to rise and shine at Anchorage House. ",
47 | "Good Morning from Anchorage House. Glad to see everyone made it. ",
48 | "Birds are awake, and so is Anchorage House. Good morning everyone!",
49 | "Good morning. Anchorage House is up and online."
50 | ] | random }}
51 | {% if is_state('calendar.holidays_in_united_states', 'on') %}
52 | Today is {{state_attr('calendar.holidays_in_united_states','message') }}.
53 | {% endif %}
54 | image: >-
55 | {{ [ "/config/www/tweet_images/coffee.jpg",
56 | "/config/www/tweet_images/coffee2.jpg"] | random }}
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/binary_sensors.yaml:
--------------------------------------------------------------------------------
1 | # Copy the config below and put it in your binary_sensors.yaml.
2 | # If you dont have one create one, or just download this one.
3 | # But be sure to update your configuration.yaml file with location of this file.
4 | #
5 | # Workday Sensor - You can define multiple of these.
6 | - platform: workday
7 | country: US
8 | province: GA
9 | workdays: [mon, tue, wed, thu, fri] # Set the days of the week you want to use.
10 |
11 | - platform: workday
12 | name: jeff_workday
13 | country: US
14 | province: GA
15 | workdays: [mon, wed, fri] # Set the days of the week you want to use.
16 |
17 | # Times Of Day: These can overlap. Go crazy.
18 | - platform: tod
19 | name: Night
20 | after: sunset
21 | before: sunrise
22 |
23 | - platform: tod
24 | name: Day
25 | after: sunrise
26 | before: sunset
27 |
28 | - platform: tod
29 | name: Quiet time
30 | after: '21:00'
31 | before: '06:00'
32 |
33 | - platform: tod
34 | name: Morning
35 | after: '06:00'
36 | before: '08:30'
37 |
38 | - platform: tod
39 | name: Midday
40 | after: '08:30'
41 | before: '17:00'
42 |
43 | - platform: tod
44 | name: Evening
45 | after: '17:00'
46 | before: '21:00'
47 |
48 | - platform: tod
49 | name: Overnight
50 | after: '18:00'
51 | before: '06:00'
52 |
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 | # Configure a default setup of Home Assistant (frontend, api, etc)
3 | default_config:
4 |
5 | # Text to speech
6 | tts:
7 | - platform: google_translate
8 |
9 | automation: !include automations.yaml
10 | script: !include scripts.yaml
11 | scene: !include scenes.yaml
12 |
13 | # You need the following line if you use the binary_sensor.yaml file.
14 | # Just add it to your configuration.yaml
15 | binary_sensor: !include binary_sensors.yaml
16 |
17 | # You need the following line if you add the sensors.yaml to your
18 | # HA Setup
19 | sensor: !include sensors.yaml
20 |
21 |
22 | # Used to track rate of change, or differences between points in time.
23 | utility_meter:
24 | # Use the 7 day history of motion at front door
25 | # to get daily motion.
26 | hourly_frontdoor_motion:
27 | source: sensor.front_door_motion # entity to track
28 | cycle: hourly # events that happened this hour
29 | daily_frontdoor_motion:
30 | source: sensor.front_door_motion
31 | cycle: daily # events today
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/scenes.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/scenes.yaml
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/scripts.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/scripts.yaml
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/secrets.yaml:
--------------------------------------------------------------------------------
1 |
2 | # Use this file to store secrets like usernames and passwords.
3 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
4 | some_password: welcome
5 |
--------------------------------------------------------------------------------
/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using/sensors.yaml:
--------------------------------------------------------------------------------
1 | # Copy the config below and put it in your sensors.yaml.
2 | # If you dont have one create one, or just download this one.
3 | # But be sure to update your configuration.yaml file with location of this file
4 | #
5 | # Track your Washer Status. This requires that you have a sensor
6 | # that can tell you when the washer is running,
7 | - platform: history_stats
8 | name: Washer Time
9 | entity_id: sensor.washer_status # Sensor you want to track
10 | state: 'running' # state you are wanting to track
11 | type: time #time becasue we want to track time
12 | end: '{{ now() }}' #track time from when it started running until now.
13 | duration:
14 | days: 7 # Keep 7 days of historuy so we can see the total for the week.
15 |
16 |
17 | # For tracking number of times motion is detected
18 | # at front door in last 7 days
19 | - platform: history_stats
20 | name: Front Door Motion
21 | entity_id: binary_sensor.aarlo_motion_front_door
22 | state: 'on'
23 | type: count
24 | end: '{{ now() }}'
25 | duration:
26 | days: 7
27 |
28 |
--------------------------------------------------------------------------------
/2022-04-HA_101-RemoteAccess/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
HA 101: Remote Access
4 |
5 |
6 | [](https://youtu.be/EQEpue7GhdI)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **configuration.yaml**
14 |
15 | Contains information on setting up remote access..
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/2022-04-HA_101-RemoteAccess/automations.yaml:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/2022-04-HA_101-RemoteAccess/configuration.yaml:
--------------------------------------------------------------------------------
1 | # Configure a default setup of Home Assistant (frontend, api, etc)
2 | default_config:
3 |
4 | http:
5 | # Paths to your Cert Files
6 | ssl_certificate: /ssl/fullchain.pem
7 | ssl_key: /ssl/privkey.pem
8 | # IP Ban
9 | ip_ban_enabled: true
10 | login_attempts_threshold: 5 # the number of failed logins before banning an ip address
11 |
12 | # Text to speech
13 | tts:
14 | - platform: google_translate
15 |
16 | automation: !include automations.yaml
17 | script: !include scripts.yaml
18 | scene: !include scenes.yaml
19 |
--------------------------------------------------------------------------------
/2022-04-HA_101-RemoteAccess/scenes.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-04-HA_101-RemoteAccess/scenes.yaml
--------------------------------------------------------------------------------
/2022-04-HA_101-RemoteAccess/scripts.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-04-HA_101-RemoteAccess/scripts.yaml
--------------------------------------------------------------------------------
/2022-04-HA_101-RemoteAccess/secrets.yaml:
--------------------------------------------------------------------------------
1 |
2 | # Use this file to store secrets like usernames and passwords.
3 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
4 | some_password: welcome
5 |
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-04-Home_Assistant_Alerts.zip
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Home Assistant Alerts
4 |
5 |
6 | [](https://youtu.be/uQwIusogTZE)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **configuration.yaml**
14 |
15 | Contains information on setting up both the link to alerts.yaml and the notifiy service if you want to use text to speech with your alerts.
16 |
17 | **alerts.yaml**
18 |
19 | Contains alerts.
20 |
21 | **automations.yaml**
22 |
23 | Contains example Automations used in the examples to show how to use an automation to manage your alerts.
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/alerts.yaml:
--------------------------------------------------------------------------------
1 | #
2 | # Basic alert
3 | simple_garage_after_dark:
4 | name: Garage Open After Dark
5 | message: Someone left the garage open. You Should Close it.
6 | done_message: Garage is closed
7 | entity_id: binary_sensor.garage_door
8 | state: "on"
9 | repeat: 5 # This will repeat every 5 minutes
10 | can_acknowledge: false
11 | skip_first: False
12 | notifiers:
13 | - mobile_app_jeffreys_iphone_8
14 |
15 | ##########################################################
16 | # Alert using a Helper
17 | unauthorized_access:
18 | name: Potential Unauthorized Access Detected
19 | done_message: Security Issue Cleared
20 | entity_id: input_boolean.security_issue
21 | state: "on"
22 | repeat: 2
23 | can_acknowledge: false
24 | skip_first: False
25 | notifiers:
26 | - mobile_app_jeffreys_iphone_8
27 |
28 | ##########################################################
29 |
30 | # Slacker Labs Alert - Randomized For Our Pleasure
31 | slackerlabs_garage_after_dark:
32 | name: Garage Open After Dark
33 | message: >
34 | {{ [
35 | 'I have noticed the garage is still open.',
36 | 'Why is the garage still open?',
37 | 'Someone forgot to close the garage.'
38 | ] | random }}
39 | {{ [
40 | 'The night is dark and full of terrors, so closing it seems like a good option.',
41 | 'Were you waiting for me to close it?',
42 | 'I am not sure we can fit anymore moths in there.',
43 | 'Stop what you are doing and close it., Please.'
44 | ] | random }}
45 |
46 | done_message: Garage is closed
47 | entity_id: input_boolean.garage_after_dark
48 | state: "on"
49 | repeat: 5
50 | can_acknowledge: false
51 | skip_first: False
52 | notifiers:
53 | - mobile_app_jeffreys_iphone_8
54 |
55 | ##########################################################
56 | # We can also leverage the state of a sensor in our message.
57 | kat_heading_home:
58 | name: Kat is headed home
59 | message: "Kat will be home in {{state_attr('sensor.kat_ett_home','duration') | round}} minutes."
60 | entity_id: input_boolean.kat_travel_monitor
61 | state: "on"
62 | repeat: 20
63 | can_acknowledge: True
64 | skip_first: False
65 | notifiers:
66 | - jeff_ios
67 | - kitchen
68 |
69 | ##########################################################
70 | # But what about washing machine notifications?
71 | # With Text to speech...
72 | washing_machine_finished:
73 | name: Washing Machine Finished
74 | message: >
75 | The washing machine completed its cycle
76 | {% set seconds = (now() - states.sensor.washer_status.last_changed).seconds %}
77 | {% set hours = seconds / 3600 %}
78 | {% if hours | int == 1 %}
79 | over an hour ago.
80 | {% elif hours | int > 1 %}
81 | over {{ hours | int }} hours ago.
82 | {% else %}
83 | {{ (seconds // 60) | int }} minutes ago.
84 | {% endif %}
85 | entity_id: input_boolean.washer_finished
86 | state: "on"
87 | repeat:
88 | - 15
89 | - 30
90 | - 45
91 | can_acknowledge: false
92 | skip_first: False
93 | notifiers:
94 | - mobile_app_jeffreys_iphone_8
95 | - living_room # A TTS Service?
96 |
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/automations.yaml:
--------------------------------------------------------------------------------
1 | # Security Issues
2 | # If doors are opened and sentry mode is on turn on security issue.
3 | #
4 | - id: security_breach
5 | alias: Security Breach
6 | trigger:
7 | - platform: state
8 | entity_id:
9 | - binary_sensor.front_door
10 | - binary_sensor.back_door
11 | - binary_sensor.side_door
12 | - binary_sensor.garage_door
13 | to: "on"
14 | condition:
15 | - condition: state
16 | entity_id: input_boolean.sentry_mode
17 | state: "on"
18 | action:
19 | - service: input_boolean.turn_on
20 | entity_id: input_boolean.security_issue
21 | initial_state: true
22 |
23 | # If garage is still open at 10:30pm turn on alart to make sure it get closed
24 | # by flipping on that garage after dark helper.
25 | - id: close_garage_lights_out
26 | alias: Close Garage at lights out
27 | initial_state: true
28 | trigger:
29 | - platform: time
30 | at: "22:30:00"
31 | condition:
32 | - condition: state
33 | entity_id: binary_sensor.garage_door
34 | state: "on"
35 | action:
36 | - service: input_boolean.turn_on
37 | entity_id: input_boolean.garage_after_dark
38 |
39 | # When Kat leaves work, turn on her travel monitor which kicks of an alert
40 | - id: kat_leaves_zoo
41 | alias: Kat Leaves Zoo Notification
42 | initial_state: true
43 | trigger:
44 | - platform: zone
45 | event: leave
46 | zone: zone.zoo
47 | entity_id: person.katherine
48 | condition:
49 | condition: time
50 | after: "16:00:00"
51 | before: "18:00:00"
52 | action:
53 | - service: input_boolean.turn_on
54 | entity_id: input_boolean.kat_travel_monitor
55 |
56 | # Turn on Washer Notification
57 | - id: washer_notification
58 | initial_state: true
59 | alias: Washer Notification
60 | trigger:
61 | - platform: state
62 | entity_id: sensor.washer_status # Status Sensor I built, but could be anything
63 | from: running
64 | to: complete
65 | action:
66 | - service: input_boolean.turn_on
67 | entity_id: input_boolean.washer_finished
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/configuration.yaml:
--------------------------------------------------------------------------------
1 | # Configure a default setup of Home Assistant (frontend, api, etc)
2 | default_config:
3 |
4 | # Text to speech
5 | tts:
6 | # This is the default TTS integration that comes with
7 | # new installs. It leverages Google's Cloud
8 | - platform: google_translate
9 |
10 | # This is Amazon Polly. Until revently this is the one I used.
11 | # Uncomment this and update the secrets.yaml with your AWS keys.
12 | # For more on Amazon Polly: https://youtu.be/Ys9xP6XP800
13 |
14 | # - platform: amazon_polly
15 | # aws_access_key_id: !secret aws_key
16 | # aws_secret_access_key: !secret aws_secret
17 | # region_name: 'us-east-1'
18 | # text_type: ssml
19 | # voice: Brian
20 | # cache: True
21 | # engine: neural
22 |
23 | automation: !include automations.yaml
24 | script: !include scripts.yaml
25 | scene: !include scenes.yaml
26 |
27 | # To use the alerts.yaml you need to add the line below to
28 | # your configuration.yaml
29 | alert: !include alerts.yaml
30 |
31 | #But if you dont want to do that you could just put them right in this file
32 | # alert:
33 | # garage_open:
34 | # name: Garage Open
35 | # message: Someone left the garage open. You Should Close it.
36 | # done_message: Garage is closed
37 | # entity_id: binary_sensor.garage_door
38 | # state: "on"
39 | # repeat: 5 # This will repeat every 5 minutes
40 | # can_acknowledge: false
41 | # skip_first: False
42 | # notifiers:
43 | # - mobile_app_jeffreys_iphone_8
44 | # another_alert
45 | # name: ...
46 |
47 | # Build your own notification service for any TTS service.
48 | notify:
49 | - name: living_room # The name
50 | platform: tts
51 | tts_service: tts.google_translate_say # The TTS service
52 | # tts_service: tts.cloud_say # Nabu Casa TTS
53 | # tts_service: tts.amazon_polly_say #for those rocking the Amazon Polly
54 | media_player: media_player.ha_blue #media player
55 |
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/scenes.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-04-Home_Assistant_Alerts/scenes.yaml
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/scripts.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-04-Home_Assistant_Alerts/scripts.yaml
--------------------------------------------------------------------------------
/2022-04-Home_Assistant_Alerts/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
JARVIS and the Amazon Echo
4 |
5 |
6 | [](https://youtu.be/p2skApFQWGE)
7 |
8 |
9 |
10 | If you use packages, just grab the jarvis.yaml file out of the packages folder. Otherwise the code is split up among the other files.
11 |
12 | Files You Need
13 |
14 | **configuration.yaml**
15 |
16 | Contains information on setting the input select helper.
17 |
18 | **automations.yaml**
19 |
20 | Contains example Automations used in the examples to show how to use this new alexa notification service for text to speech in your automations.
21 |
22 | **scrips.yaml**
23 |
24 | Contains example speech_engine_demo
25 |
26 | **packages/jarvis.yaml**
27 |
28 | The package verison of this code.
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/automations.yaml:
--------------------------------------------------------------------------------
1 |
2 | # Example Automations
3 |
4 | - alias: Lightning Detected Announcement
5 | trigger:
6 | - platform: state
7 | entity_id: sensor.lightning_warning
8 | to: 'Unsafe'
9 | action:
10 | - service: notify.alexa_media
11 | data:
12 | message: >
13 |
14 |
15 |
16 | Pardon me, Lightning has been detected.
17 |
18 |
19 |
20 | target: media_player.kitchen_echo
21 | data:
22 | type: tts
23 |
24 |
25 | - alias: Lightning Detected Alt
26 | trigger:
27 | - platform: state
28 | entity_id: sensor.lightning_warning
29 | to: 'Unsafe'
30 | action:
31 | - service: script.speech_engine_demo
32 | data:
33 | message: 'Pardon me, Lightning has been detected.'
34 | who: kitchen
35 | voice: "{{ states('input_select.jarvis_voice') }}"
36 | #voice: Brian
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/configuration.yaml:
--------------------------------------------------------------------------------
1 | # Configure a default setup of Home Assistant (frontend, api, etc)
2 | default_config:
3 |
4 | http:
5 | packages: !include_dir_named packages # needed if you are going to use packages
6 |
7 | # Text to speech
8 | tts:
9 | # This is the default TTS integration that comes with
10 | # new installs. It leverages Google's Cloud
11 | - platform: google_translate
12 |
13 | # This is Amazon Polly. Until revently this is the one I used.
14 | # Uncomment this and update the secrets.yaml with your AWS keys.
15 | # For more on Amazon Polly: https://youtu.be/Ys9xP6XP800
16 |
17 | # - platform: amazon_polly
18 | # aws_access_key_id: !secret aws_key
19 | # aws_secret_access_key: !secret aws_secret
20 | # region_name: 'us-east-1'
21 | # text_type: ssml
22 | # voice: Brian
23 | # cache: True
24 | # engine: neural
25 |
26 | automation: !include automations.yaml
27 | script: !include scripts.yaml
28 | scene: !include scenes.yaml
29 |
30 | # Uncomment the lines blow if you want to deinfe the input select here
31 | input_select:
32 | jarvis_voice:
33 | name: Jarvis voice
34 | options:
35 | - Brian
36 | - Emma
37 | initial: Brian
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/packages/jarvis.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | input_select:
4 | jarvis_voice:
5 | name: Jarvis voice
6 | options:
7 | - Brian
8 | - Emma
9 | initial: Brian
10 |
11 |
12 |
13 |
14 |
15 |
16 | automation:
17 | - alias: Lightning Detected Announcement
18 | trigger:
19 | - platform: state
20 | entity_id: sensor.lightning_warning
21 | to: 'Unsafe'
22 | action:
23 | - service: notify.alexa_media
24 | data:
25 | message: >
26 |
27 |
28 |
29 | Pardon me, Lightning has been detected.
30 |
31 |
32 |
33 | target: media_player.kitchen_echo
34 | data:
35 | type: tts
36 |
37 |
38 |
39 |
40 |
41 |
42 | - alias: Lightning Detected Alt
43 | trigger:
44 | - platform: state
45 | entity_id: sensor.lightning_warning
46 | to: 'Unsafe'
47 | action:
48 | - service: script.speech_engine_demo
49 | data:
50 | message: 'Pardon me, Lightning has been detected.'
51 | who: kitchen
52 | voice: "{{ states('input_select.jarvis_voice') }}"
53 | #voice: Brian
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | script:
63 | speech_engine_demo:
64 | sequence:
65 | # - condition: state
66 | # entity_id: input_boolean.audible_notifications
67 | # state: 'on'
68 | # - condition: state
69 | # entity_id: group.family
70 | # state: 'home'
71 | # - condition: state
72 | # entity_id: input_boolean.vacation_mode
73 | # state: 'off'
74 | - service: notify.alexa_media
75 | data:
76 | message: >
77 |
78 |
79 |
80 | {{ message }}
81 |
82 |
83 |
84 | target: >
85 | {% if who in ['kitchen_echo','media_player.kitchen_echo','kitchen'] %}
86 | media_player.kitchen_echo
87 | {% elif who in ['skylar_bedroom','media_player.skylars_echo','skylars_bedroom','skylars_echo'] %}
88 | media_player.skylars_bedroom_echo
89 | {% elif who in ['master_bedroom', 'media_player.dads_desk'] %}
90 | media_player.dads_desk
91 | {% elif who in ['livingroom_echo','media_player.living_room_echo','living_room', 'main'] %}
92 | media_player.living_room_echo
93 | {% elif who in ['all'] %}
94 | group.all_echos
95 | {% elif who in ['garage'] %}
96 | media_player.garage_echo
97 | {% else %}
98 | media_player.living_room_echo
99 | {% endif %}
100 | data:
101 | type: tts
102 |
103 |
104 |
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/scenes.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-05-Jarvis_Echo/scenes.yaml
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/scripts.yaml:
--------------------------------------------------------------------------------
1 | # Example Scripts
2 |
3 | speech_engine_demo:
4 | sequence:
5 | # - condition: state
6 | # entity_id: input_boolean.audible_notifications
7 | # state: 'on'
8 | # - condition: state
9 | # entity_id: group.family
10 | # state: 'home'
11 | # - condition: state
12 | # entity_id: input_boolean.vacation_mode
13 | # state: 'off'
14 | - service: notify.alexa_media
15 | data:
16 | message: >
17 |
18 |
19 |
20 | {{ message }}
21 |
22 |
23 |
24 | target: >
25 | {% if who in ['kitchen_echo','media_player.kitchen_echo','kitchen'] %}
26 | media_player.kitchen_echo
27 | {% elif who in ['skylar_bedroom','media_player.skylars_echo','skylars_bedroom','skylars_echo'] %}
28 | media_player.skylars_bedroom_echo
29 | {% elif who in ['master_bedroom', 'media_player.dads_desk'] %}
30 | media_player.dads_desk
31 | {% elif who in ['livingroom_echo','media_player.living_room_echo','living_room', 'main'] %}
32 | media_player.living_room_echo
33 | {% elif who in ['all'] %}
34 | group.all_echos
35 | {% elif who in ['garage'] %}
36 | media_player.garage_echo
37 | {% else %}
38 | media_player.living_room_echo
39 | {% endif %}
40 | data:
41 | type: tts
--------------------------------------------------------------------------------
/2022-05-Jarvis_Echo/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Notification Recall System
4 |
5 |
6 | [](https://youtube.com/c/SlackerLabs)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **configuration.yaml**
14 |
15 | Contains sensors for those not wanting to use the package
16 |
17 | **scripts.yaml**
18 |
19 | Contains scripts used for the speech engine and for the playing of the stored message.
20 |
21 | **packages/notifications.yaml**
22 |
23 | Contains everything you need. If you grab this besure to add the package line under http to your config.
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/automations.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-05-Jarvis_Recall/automations.yaml
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Configure a default setup of Home Assistant (frontend, api, etc)
4 | default_config:
5 |
6 | # Only uncomment this if you want to use the package directory.
7 | # Otherwise copy the sensor section below and the scripts in tje sceript directory.
8 | #http:
9 | #packages: !include_dir_named packages # needed if you are going to use packages
10 |
11 | # Text to speech
12 | tts:
13 | # This is the default TTS integration that comes with
14 | # new installs. It leverages Google's Cloud
15 | - platform: google_translate
16 |
17 | # This is Amazon Polly. Until revently this is the one I used.
18 | # Uncomment this and update the secrets.yaml with your AWS keys.
19 | # For more on Amazon Polly: https://youtu.be/Ys9xP6XP800
20 |
21 | # - platform: amazon_polly
22 | # aws_access_key_id: !secret aws_key
23 | # aws_secret_access_key: !secret aws_secret
24 | # region_name: 'us-east-1'
25 | # text_type: ssml
26 | # voice: Brian
27 | # cache: True
28 | # engine: neural
29 |
30 | automation: !include automations.yaml
31 | script: !include scripts.yaml
32 | scene: !include scenes.yaml
33 |
34 |
35 | # Sensors to grab data from MQTT for use in scripts
36 | sensor:
37 | - platform: mqtt
38 | name: "Jarvis Last Msg"
39 | state_topic: "house/polly/lastmsg"
40 | - platform: mqtt
41 | name: "Jarvis Last Location"
42 | state_topic: "house/polly/lastloc"
43 | - platform: mqtt
44 | name: "Jarvis Last Msg Time"
45 | state_topic: "house/polly/msgtime"
46 |
47 | # For those of you Wathcing this after the 2022.6 release use this:
48 | # mqtt:
49 | # sensor:
50 | # - name: "Jarvis Last Msg"
51 | # state_topic: "house/polly/lastmsg"
52 | # - name: "Jarvis Last Location"
53 | # state_topic: "house/polly/lastloc"
54 | # - name: "Jarvis Last Msg Time"
55 | # state_topic: "house/polly/msgtime"
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/packages/notifications.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Sensors to grab data from MQTT for use in scripts
4 | sensor:
5 | - platform: mqtt
6 | name: "Jarvis Last Msg"
7 | state_topic: "house/polly/lastmsg"
8 | - platform: mqtt
9 | name: "Jarvis Last Location"
10 | state_topic: "house/polly/lastloc"
11 | - platform: mqtt
12 | name: "Jarvis Last Msg Time"
13 | state_topic: "house/polly/msgtime"
14 |
15 | # For those of you Wathcing this after the 2022.6 release use this:
16 | # mqtt:
17 | # sensor:
18 | # - name: "Jarvis Last Msg"
19 | # state_topic: "house/polly/lastmsg"
20 | # - name: "Jarvis Last Location"
21 | # state_topic: "house/polly/lastloc"
22 | # - name: "Jarvis Last Msg Time"
23 | # state_topic: "house/polly/msgtime"
24 |
25 |
26 |
27 |
28 |
29 | # # To call the speech engine script below use the following as a guide:
30 |
31 | # - service: script.speech_engine_simplified
32 | # data:
33 | # who: '{{ states(''sensor.room_audio'') }}'
34 | # message: >
35 | # At {{ states('sensor.jarvis_last_msg_time') }} in the {{ states('sensor.jarvis_last_location') }} I said. {{ states('sensor.jarvis_last_msg') }}
36 | # msg_summary: "recall"
37 |
38 | script:
39 | # A simplified Speech Engine that for your text to speech notifications.
40 | speech_engine_simplified:
41 | sequence:
42 | # Any conditions you want to include.
43 |
44 | # - condition: state
45 | # entity_id: input_boolean.audible_notifications
46 | # state: 'on'
47 |
48 | # Call your TTS Service
49 | - service: tts.amazon_polly_say
50 | data_template:
51 | entity_id: >-
52 | {{ who }}
53 | message: >-
54 |
55 |
56 | {{ message }}
57 |
58 | cache: true
59 |
60 | # Save your message for recall
61 | - service: mqtt.publish
62 | data_template:
63 | topic: 'house/polly/lastmsg'
64 | payload: >
65 | {% if msg_summary == 'recall' %}
66 | {% set msg_summary = '{{states(''sensor.jarvis_last_msg'')}}' %}
67 | {% else %}
68 | {% if msg_summary %}
69 | {% set message = msg_summary %}
70 | {% endif %}
71 | {%- macro cleanup(data) -%}
72 | {%- for item in data.split("\n") if item | trim != "" -%}
73 | {{ item | trim }} {% endfor -%}
74 | {%- endmacro -%}
75 | {{- cleanup( message | striptags | truncate(220) ) -}}
76 | {% endif %}
77 |
78 | # Save time of last message
79 | - service: mqtt.publish
80 | data_template:
81 | topic: 'house/polly/msgtime'
82 | payload: >
83 | {{ now().strftime("%-I") }}:{{ now().strftime("%M") }} {{ now().strftime("%p") }}
84 | retain: true
85 |
86 | # Save location
87 | - service: mqtt.publish
88 | data_template:
89 | topic: 'house/polly/lastloc'
90 | payload: '{{ who }}'
91 | retain: true
92 |
93 | # Script for playing the last message.
94 | # You can call this from a routing on the Google Home or Amazon Echo
95 | # Or from an automation tiggered by a button.
96 | play_last_message:
97 | sequence:
98 | - service: script.speech_engine_simplified
99 | data:
100 | who: '{{ states(''sensor.room_audio'') }}'
101 | message: >
102 | At {{ states('sensor.jarvis_last_msg_time') }}
103 | in the {{ states('sensor.jarvis_last_location') }}
104 | I said. {{ states('sensor.jarvis_last_msg') }}
105 | msg_summary: "recall"
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/scenes.yaml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/2022-05-Jarvis_Recall/scenes.yaml
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/scripts.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # A simplified Speech Engine that for your text to speech notifications.
4 | speech_engine_simplified:
5 | sequence:
6 | # Any conditions you want to include.
7 |
8 | # - condition: state
9 | # entity_id: input_boolean.audible_notifications
10 | # state: 'on'
11 | # - condition: state
12 | # entity_id: group.family
13 | # state: 'home'
14 | # - condition: state
15 | # entity_id: input_boolean.vacation_mode
16 | # state: 'off'
17 |
18 | # Call your TTS Service
19 | # I use the break time in the message to give the google home time to wake up.
20 | - service: tts.amazon_polly_say
21 | data_template:
22 | entity_id: >-
23 | {{ who }}
24 | message: >-
25 |
26 |
27 | {{ message }}
28 |
29 | cache: true
30 |
31 | # Save your message for recall
32 | - service: mqtt.publish
33 | data_template:
34 | topic: 'house/polly/lastmsg'
35 | payload: >
36 | {% if msg_summary == 'recall' %}
37 | {% set msg_summary = '{{states(''sensor.jarvis_last_msg'')}}' %}
38 | {% else %}
39 | {% if msg_summary %}
40 | {% set message = msg_summary %}
41 | {% endif %}
42 | {%- macro cleanup(data) -%}
43 | {%- for item in data.split("\n") if item | trim != "" -%}
44 | {{ item | trim }} {% endfor -%}
45 | {%- endmacro -%}
46 | {{- cleanup( message | striptags | truncate(220) ) -}}
47 | {% endif %}
48 |
49 | # Save time of last message
50 | - service: mqtt.publish
51 | data_template:
52 | topic: 'house/polly/msgtime'
53 | payload: >
54 | {{ now().strftime("%-I") }}:{{ now().strftime("%M") }} {{ now().strftime("%p") }}
55 | retain: true
56 |
57 | # Save location
58 | - service: mqtt.publish
59 | data_template:
60 | topic: 'house/polly/lastloc'
61 | payload: '{{ who }}'
62 | retain: true
63 |
64 |
65 |
66 | # Script for playing the last message.
67 | # You can call this from a routing on the Google Home or Amazon Echo
68 | # Or from an automation tiggered by a button.
69 | play_last_message:
70 | sequence:
71 | - service: script.speech_engine_simplified
72 | data:
73 | who: '{{ states(''sensor.room_audio'') }}'
74 | message: >
75 | At {{ states('sensor.jarvis_last_msg_time') }}
76 | in the {{ states('sensor.jarvis_last_location') }}
77 | I said. {{ states('sensor.jarvis_last_msg') }}
78 | msg_summary: "recall"
79 |
80 |
81 |
--------------------------------------------------------------------------------
/2022-05-Jarvis_Recall/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2022-09-LumaryLights/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Lumary LED Recessed Lighting Automations
4 |
5 |
6 | [](https://youtu.be/9kVT3dX4MvI)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **automations.yaml**
14 |
15 | Contains automations used for the Lumary Lighting.
16 |
17 | **scenes.yaml**
18 |
19 | Contains scenes used with the Lumary Lighting.
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/2022-09-LumaryLights/automations.yaml:
--------------------------------------------------------------------------------
1 | - id: '1659356428735'
2 | alias: Kitchen Lighting
3 | description: ''
4 | trigger:
5 | - platform: state
6 | entity_id:
7 | - binary_sensor.kitchen_motion
8 | from: 'off'
9 | to: 'on'
10 | id: Light_Needed
11 | - platform: state
12 | entity_id:
13 | - binary_sensor.kitchen_motion
14 | from: 'on'
15 | to: 'off'
16 | for:
17 | hours: 0
18 | minutes: 10
19 | seconds: 0
20 | id: light_not_needed
21 | condition: []
22 | action:
23 | - choose:
24 | - conditions:
25 | - condition: state
26 | entity_id: light.kitchen_lights
27 | state: 'off'
28 | - condition: trigger
29 | id: Light_Needed
30 | sequence:
31 | - service: scene.turn_on
32 | data: {}
33 | target:
34 | entity_id: scene.kitchen_normal
35 | - conditions:
36 | - condition: trigger
37 | id: light_not_needed
38 | sequence:
39 | - service: scene.turn_on
40 | data: {}
41 | target:
42 | entity_id: scene.kitchen_dark
43 | default: []
44 | mode: restart
45 | - id: '1659356561696'
46 | alias: Bar Lighting
47 | description: ''
48 | trigger:
49 | - platform: state
50 | entity_id:
51 | - binary_sensor.bar_motion
52 | from: 'off'
53 | to: 'on'
54 | id: light_needed
55 | - platform: state
56 | entity_id:
57 | - binary_sensor.bar_motion
58 | from: 'on'
59 | to: 'off'
60 | for:
61 | hours: 0
62 | minutes: 10
63 | seconds: 0
64 | id: light_not_needed
65 | condition: []
66 | action:
67 | - choose:
68 | - conditions:
69 | - condition: state
70 | entity_id: light.bar_lights
71 | state: 'off'
72 | - condition: trigger
73 | id: light_needed
74 | sequence:
75 | - service: scene.turn_on
76 | data: {}
77 | target:
78 | entity_id: scene.bar_normal
79 | - conditions:
80 | - condition: trigger
81 | id: light_not_needed
82 | sequence:
83 | - service: scene.turn_on
84 | data: {}
85 | target:
86 | entity_id: scene.bar_dark
87 | default: []
88 | mode: restart
89 | - id: '1659356679430'
90 | alias: Pantry Lighting
91 | description: ''
92 | trigger:
93 | - platform: state
94 | entity_id:
95 | - binary_sensor.pantry_motion
96 | from: 'off'
97 | to: 'on'
98 | id: light_needed
99 | - platform: state
100 | entity_id:
101 | - binary_sensor.pantry_motion
102 | from: 'on'
103 | to: 'off'
104 | id: light_not_needed
105 | for:
106 | hours: 0
107 | minutes: 10
108 | seconds: 0
109 | condition: []
110 | action:
111 | - choose:
112 | - conditions:
113 | - condition: state
114 | entity_id: light.pantry_lights
115 | state: 'off'
116 | - condition: trigger
117 | id: light_needed
118 | sequence:
119 | - service: scene.turn_on
120 | data: {}
121 | target:
122 | entity_id: scene.pantry_normal
123 | - conditions:
124 | - condition: trigger
125 | id: light_not_needed
126 | sequence:
127 | - service: scene.turn_on
128 | data: {}
129 | target:
130 | entity_id: scene.pantry_dark
131 | default: []
132 | mode: restart
133 |
134 |
--------------------------------------------------------------------------------
/2022-09-LumaryLights/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Configure a default setup of Home Assistant (frontend, api, etc)
4 | default_config:
5 |
6 | # Only uncomment this if you want to use the package directory.
7 | # Otherwise copy the sensor section below and the scripts in tje sceript directory.
8 | #http:
9 | #packages: !include_dir_named packages # needed if you are going to use packages
10 |
11 | automation: !include automations.yaml
12 | scene: !include scenes.yaml
13 |
--------------------------------------------------------------------------------
/2022-09-LumaryLights/packages/notifications.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Sensors to grab data from MQTT for use in scripts
4 | sensor:
5 | - platform: mqtt
6 | name: "Jarvis Last Msg"
7 | state_topic: "house/polly/lastmsg"
8 | - platform: mqtt
9 | name: "Jarvis Last Location"
10 | state_topic: "house/polly/lastloc"
11 | - platform: mqtt
12 | name: "Jarvis Last Msg Time"
13 | state_topic: "house/polly/msgtime"
14 |
15 | # For those of you Wathcing this after the 2022.6 release use this:
16 | # mqtt:
17 | # sensor:
18 | # - name: "Jarvis Last Msg"
19 | # state_topic: "house/polly/lastmsg"
20 | # - name: "Jarvis Last Location"
21 | # state_topic: "house/polly/lastloc"
22 | # - name: "Jarvis Last Msg Time"
23 | # state_topic: "house/polly/msgtime"
24 |
25 |
26 |
27 |
28 |
29 | # # To call the speech engine script below use the following as a guide:
30 |
31 | # - service: script.speech_engine_simplified
32 | # data:
33 | # who: '{{ states(''sensor.room_audio'') }}'
34 | # message: >
35 | # At {{ states('sensor.jarvis_last_msg_time') }} in the {{ states('sensor.jarvis_last_location') }} I said. {{ states('sensor.jarvis_last_msg') }}
36 | # msg_summary: "recall"
37 |
38 | script:
39 | # A simplified Speech Engine that for your text to speech notifications.
40 | speech_engine_simplified:
41 | sequence:
42 | # Any conditions you want to include.
43 |
44 | # - condition: state
45 | # entity_id: input_boolean.audible_notifications
46 | # state: 'on'
47 |
48 | # Call your TTS Service
49 | - service: tts.amazon_polly_say
50 | data_template:
51 | entity_id: >-
52 | {{ who }}
53 | message: >-
54 |
55 |
56 | {{ message }}
57 |
58 | cache: true
59 |
60 | # Save your message for recall
61 | - service: mqtt.publish
62 | data_template:
63 | topic: 'house/polly/lastmsg'
64 | payload: >
65 | {% if msg_summary == 'recall' %}
66 | {% set msg_summary = '{{states(''sensor.jarvis_last_msg'')}}' %}
67 | {% else %}
68 | {% if msg_summary %}
69 | {% set message = msg_summary %}
70 | {% endif %}
71 | {%- macro cleanup(data) -%}
72 | {%- for item in data.split("\n") if item | trim != "" -%}
73 | {{ item | trim }} {% endfor -%}
74 | {%- endmacro -%}
75 | {{- cleanup( message | striptags | truncate(220) ) -}}
76 | {% endif %}
77 |
78 | # Save time of last message
79 | - service: mqtt.publish
80 | data_template:
81 | topic: 'house/polly/msgtime'
82 | payload: >
83 | {{ now().strftime("%-I") }}:{{ now().strftime("%M") }} {{ now().strftime("%p") }}
84 | retain: true
85 |
86 | # Save location
87 | - service: mqtt.publish
88 | data_template:
89 | topic: 'house/polly/lastloc'
90 | payload: '{{ who }}'
91 | retain: true
92 |
93 | # Script for playing the last message.
94 | # You can call this from a routing on the Google Home or Amazon Echo
95 | # Or from an automation tiggered by a button.
96 | play_last_message:
97 | sequence:
98 | - service: script.speech_engine_simplified
99 | data:
100 | who: '{{ states(''sensor.room_audio'') }}'
101 | message: >
102 | At {{ states('sensor.jarvis_last_msg_time') }}
103 | in the {{ states('sensor.jarvis_last_location') }}
104 | I said. {{ states('sensor.jarvis_last_msg') }}
105 | msg_summary: "recall"
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/2022-09-LumaryLights/scenes.yaml:
--------------------------------------------------------------------------------
1 | - id: '1659356031043'
2 | name: Kitchen Normal
3 | entities:
4 | light.kitchen_lights:
5 | min_mireds: 153
6 | max_mireds: 500
7 | supported_color_modes:
8 | - brightness
9 | - color_temp
10 | - hs
11 | color_mode: color_temp
12 | brightness: 255
13 | color_temp: 153
14 | hs_color:
15 | - 54.768
16 | - 1.6
17 | rgb_color:
18 | - 255
19 | - 254
20 | - 250
21 | xy_color:
22 | - 0.326
23 | - 0.333
24 | entity_id:
25 | - light.lumary_smart_recessed_downlight_a2_3
26 | - light.lumary_smart_recessed_downlight_a2_9
27 | - light.lumary_smart_recessed_downlight_a2_8
28 | - light.lumary_smart_recessed_downlight_a2_6
29 | icon: mdi:lightbulb-group
30 | friendly_name: Kitchen Lights
31 | supported_features: 0
32 | state: 'on'
33 | light.lumary_smart_recessed_downlight_a2_7:
34 | min_mireds: 153
35 | max_mireds: 500
36 | supported_color_modes:
37 | - brightness
38 | - color_temp
39 | - hs
40 | color_mode: color_temp
41 | brightness: 255
42 | color_temp: 153
43 | hs_color:
44 | - 54.768
45 | - 1.6
46 | rgb_color:
47 | - 255
48 | - 254
49 | - 250
50 | xy_color:
51 | - 0.326
52 | - 0.333
53 | friendly_name: Fridge Light
54 | supported_features: 0
55 | state: 'on'
56 | metadata:
57 | light.kitchen_lights:
58 | entity_only: true
59 | light.lumary_smart_recessed_downlight_a2_7:
60 | entity_only: true
61 | - id: '1659356107704'
62 | name: Pantry Normal
63 | entities:
64 | light.pantry_lights:
65 | min_mireds: 153
66 | max_mireds: 500
67 | supported_color_modes:
68 | - brightness
69 | - color_temp
70 | - hs
71 | color_mode: color_temp
72 | brightness: 255
73 | color_temp: 153
74 | hs_color:
75 | - 54.768
76 | - 1.6
77 | rgb_color:
78 | - 255
79 | - 254
80 | - 250
81 | xy_color:
82 | - 0.326
83 | - 0.333
84 | entity_id:
85 | - light.lumary_smart_recessed_downlight_a2_5
86 | - light.lumary_smart_recessed_downlight_a2_4
87 | icon: mdi:lightbulb-group
88 | friendly_name: Pantry Lights
89 | supported_features: 0
90 | state: 'on'
91 | metadata:
92 | light.pantry_lights:
93 | entity_only: true
94 | - id: '1659356121269'
95 | name: Bar Normal
96 | entities:
97 | light.bar_lights:
98 | min_mireds: 153
99 | max_mireds: 500
100 | supported_color_modes:
101 | - brightness
102 | - color_temp
103 | - hs
104 | color_mode: color_temp
105 | brightness: 99
106 | color_temp: 153
107 | hs_color:
108 | - 54.768
109 | - 1.6
110 | rgb_color:
111 | - 255
112 | - 254
113 | - 250
114 | xy_color:
115 | - 0.326
116 | - 0.333
117 | entity_id:
118 | - light.lumary_smart_rgb_tunable_white_recessed_light_a2
119 | - light.lumary_smart_recessed_downlight_a2_2
120 | icon: mdi:lightbulb-group
121 | friendly_name: Bar Lights
122 | supported_features: 0
123 | state: 'on'
124 | metadata:
125 | light.bar_lights:
126 | entity_only: true
127 | - id: '1659356333948'
128 | name: Kitchen Dark
129 | entities:
130 | light.kitchen_lights:
131 | min_mireds: 153
132 | max_mireds: 500
133 | supported_color_modes:
134 | - brightness
135 | - color_temp
136 | - hs
137 | entity_id:
138 | - light.lumary_smart_recessed_downlight_a2_3
139 | - light.lumary_smart_recessed_downlight_a2_9
140 | - light.lumary_smart_recessed_downlight_a2_8
141 | - light.lumary_smart_recessed_downlight_a2_6
142 | icon: mdi:lightbulb-group
143 | friendly_name: Kitchen Lights
144 | supported_features: 0
145 | state: 'off'
146 | light.lumary_smart_recessed_downlight_a2_7:
147 | min_mireds: 153
148 | max_mireds: 500
149 | supported_color_modes:
150 | - brightness
151 | - color_temp
152 | - hs
153 | friendly_name: Fridge Light
154 | supported_features: 0
155 | state: 'off'
156 | metadata:
157 | light.kitchen_lights:
158 | entity_only: true
159 | light.lumary_smart_recessed_downlight_a2_7:
160 | entity_only: true
161 | - id: '1659356371875'
162 | name: Bar Dark
163 | entities:
164 | light.bar_lights:
165 | min_mireds: 153
166 | max_mireds: 500
167 | supported_color_modes:
168 | - brightness
169 | - color_temp
170 | - hs
171 | entity_id:
172 | - light.lumary_smart_rgb_tunable_white_recessed_light_a2
173 | - light.lumary_smart_recessed_downlight_a2_2
174 | icon: mdi:lightbulb-group
175 | friendly_name: Bar Lights
176 | supported_features: 0
177 | state: 'off'
178 | metadata:
179 | light.bar_lights:
180 | entity_only: true
181 | - id: '1659356387035'
182 | name: Pantry Dark
183 | entities:
184 | light.pantry_lights:
185 | min_mireds: 153
186 | max_mireds: 500
187 | supported_color_modes:
188 | - brightness
189 | - color_temp
190 | - hs
191 | entity_id:
192 | - light.lumary_smart_recessed_downlight_a2_5
193 | - light.lumary_smart_recessed_downlight_a2_4
194 | icon: mdi:lightbulb-group
195 | friendly_name: Pantry Lights
196 | supported_features: 0
197 | state: 'off'
198 | metadata:
199 | light.pantry_lights:
200 | entity_only: true
--------------------------------------------------------------------------------
/2022-09-LumaryLights/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2022-09-MQTTErrors/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
MQTT Errors
4 |
5 |
6 | [](https://youtu.be/SKvuW5mUVJU)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **configuration.yaml**
14 |
15 | Contains link to mqtt.yaml file, or mqtt: definitions.
16 |
17 | **mqtt.yaml**
18 |
19 | Example of the mqtt.yaml file.
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/2022-09-MQTTErrors/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Configure a default setup of Home Assistant (frontend, api, etc)
4 | default_config:
5 |
6 | # Only uncomment this if you want to use the package directory.
7 | # Otherwise copy the sensor section below and the scripts in tje sceript directory.
8 | #http:
9 | #packages: !include_dir_named packages # needed if you are going to use packages
10 |
11 | mqtt: !include mqtt.yaml
12 |
13 | # Or just define them in this file like:
14 |
15 | # mqtt:
16 | # sensor:
17 | # - name: "Family Status"
18 | # state_topic: "house/family/status"
19 | # payload_available: "online"
20 | # payload_not_available: "offline"
21 | # - name: "Family Arrived"
22 | # state_topic: "house/family/arrived"
23 | # payload_available: "online"
24 | # payload_not_available: "offline"
25 | # - name: "Jeff Last Known Location"
26 | # state_topic: "house/jeff/last_known_location"
27 | # payload_available: "online"
28 | # payload_not_available: "offline"
29 | # - name: "Kat Last Known Location"
30 | # state_topic: "house/kat/last_known_location"
31 | # payload_available: "online"
32 | # payload_not_available: "offline"
33 |
--------------------------------------------------------------------------------
/2022-09-MQTTErrors/mqtt.yaml:
--------------------------------------------------------------------------------
1 | sensor:
2 | - name: "Family Status"
3 | state_topic: "house/family/status"
4 | payload_available: "online"
5 | payload_not_available: "offline"
6 | - name: "Family Arrived"
7 | state_topic: "house/family/arrived"
8 | payload_available: "online"
9 | payload_not_available: "offline"
10 | - name: "Jeff Last Known Location"
11 | state_topic: "house/jeff/last_known_location"
12 | payload_available: "online"
13 | payload_not_available: "offline"
14 | - name: "Kat Last Known Location"
15 | state_topic: "house/kat/last_known_location"
16 | payload_available: "online"
17 | payload_not_available: "offline"
--------------------------------------------------------------------------------
/2022-09-MQTTErrors/packages/notifications.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Sensors to grab data from MQTT for use in scripts
4 | sensor:
5 | - platform: mqtt
6 | name: "Jarvis Last Msg"
7 | state_topic: "house/polly/lastmsg"
8 | - platform: mqtt
9 | name: "Jarvis Last Location"
10 | state_topic: "house/polly/lastloc"
11 | - platform: mqtt
12 | name: "Jarvis Last Msg Time"
13 | state_topic: "house/polly/msgtime"
14 |
15 | # For those of you Wathcing this after the 2022.6 release use this:
16 | # mqtt:
17 | # sensor:
18 | # - name: "Jarvis Last Msg"
19 | # state_topic: "house/polly/lastmsg"
20 | # - name: "Jarvis Last Location"
21 | # state_topic: "house/polly/lastloc"
22 | # - name: "Jarvis Last Msg Time"
23 | # state_topic: "house/polly/msgtime"
24 |
25 |
26 |
27 |
28 |
29 | # # To call the speech engine script below use the following as a guide:
30 |
31 | # - service: script.speech_engine_simplified
32 | # data:
33 | # who: '{{ states(''sensor.room_audio'') }}'
34 | # message: >
35 | # At {{ states('sensor.jarvis_last_msg_time') }} in the {{ states('sensor.jarvis_last_location') }} I said. {{ states('sensor.jarvis_last_msg') }}
36 | # msg_summary: "recall"
37 |
38 | script:
39 | # A simplified Speech Engine that for your text to speech notifications.
40 | speech_engine_simplified:
41 | sequence:
42 | # Any conditions you want to include.
43 |
44 | # - condition: state
45 | # entity_id: input_boolean.audible_notifications
46 | # state: 'on'
47 |
48 | # Call your TTS Service
49 | - service: tts.amazon_polly_say
50 | data_template:
51 | entity_id: >-
52 | {{ who }}
53 | message: >-
54 |
55 |
56 | {{ message }}
57 |
58 | cache: true
59 |
60 | # Save your message for recall
61 | - service: mqtt.publish
62 | data_template:
63 | topic: 'house/polly/lastmsg'
64 | payload: >
65 | {% if msg_summary == 'recall' %}
66 | {% set msg_summary = '{{states(''sensor.jarvis_last_msg'')}}' %}
67 | {% else %}
68 | {% if msg_summary %}
69 | {% set message = msg_summary %}
70 | {% endif %}
71 | {%- macro cleanup(data) -%}
72 | {%- for item in data.split("\n") if item | trim != "" -%}
73 | {{ item | trim }} {% endfor -%}
74 | {%- endmacro -%}
75 | {{- cleanup( message | striptags | truncate(220) ) -}}
76 | {% endif %}
77 |
78 | # Save time of last message
79 | - service: mqtt.publish
80 | data_template:
81 | topic: 'house/polly/msgtime'
82 | payload: >
83 | {{ now().strftime("%-I") }}:{{ now().strftime("%M") }} {{ now().strftime("%p") }}
84 | retain: true
85 |
86 | # Save location
87 | - service: mqtt.publish
88 | data_template:
89 | topic: 'house/polly/lastloc'
90 | payload: '{{ who }}'
91 | retain: true
92 |
93 | # Script for playing the last message.
94 | # You can call this from a routing on the Google Home or Amazon Echo
95 | # Or from an automation tiggered by a button.
96 | play_last_message:
97 | sequence:
98 | - service: script.speech_engine_simplified
99 | data:
100 | who: '{{ states(''sensor.room_audio'') }}'
101 | message: >
102 | At {{ states('sensor.jarvis_last_msg_time') }}
103 | in the {{ states('sensor.jarvis_last_location') }}
104 | I said. {{ states('sensor.jarvis_last_msg') }}
105 | msg_summary: "recall"
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/2022-09-MQTTErrors/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2022-10-AutomatingTimers/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Automating with Timers
4 |
5 |
6 | [](https://youtu.be/SuLPMxQUv0Q)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **automations.yaml**
14 |
15 | Contains the Automation discussed in the video.
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/2022-10-AutomatingTimers/automations.yaml:
--------------------------------------------------------------------------------
1 | # This Automation simply handles turning off a deivce that has been turned on
2 | # by a different method. But you could include a trigger for turning on the device
3 | - id: '1663251471668'
4 | alias: Studio Wax Warmer
5 | description: 'This automation handles the Wax Warmer in the Studio'
6 | trigger:
7 | # Trigger this automation when it the device turns on.
8 | - platform: state
9 | entity_id:
10 | - switch.studio_airfreshener
11 | from: 'off'
12 | to: 'on'
13 | id: wax_on # this is needed for the choose action.
14 | # Trigger when timer finishes. Need to watch for an event.
15 | - platform: event
16 | event_type: timer.finished
17 | event_data:
18 | entity_id: timer.studio_wax_warmer
19 | id: wax_off # this is needed for the choose action.
20 | condition: []
21 | action:
22 | # the choose action allows us to handle our truggers differently.
23 | - choose:
24 | # First, when the device turns on we need to start our timer.
25 | # This timer will run until stopped, so if you have conditions that
26 | # should stop this timer you will need to make sure that are also in the trigger.
27 | # Then just add another condition in this choose action to handle stopping the timer.
28 | - conditions:
29 | - condition: trigger
30 | id: wax_on
31 | sequence:
32 | - service: timer.start
33 | data: {}
34 | target:
35 | entity_id: timer.studio_wax_warmer
36 | # Now we need to handle when the timer has finished. And we just turn off our device.
37 | - conditions:
38 | - condition: trigger
39 | id: wax_off
40 | sequence:
41 | - service: switch.turn_off
42 | data: {}
43 | target:
44 | entity_id: switch.studio_airfreshener
45 | mode: single
--------------------------------------------------------------------------------
/2022-10-AutomatingTimers/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Configure a default setup of Home Assistant (frontend, api, etc)
4 | default_config:
5 |
6 | automation: !include automations.yaml
--------------------------------------------------------------------------------
/2022-10-AutomatingTimers/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2023-MasterTemplates_StateBasedEntities/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Master Home Assistant Templates: State Based Templates
4 |
5 |
6 | [](https://youtu.be/XR8mkJB4k88)
7 |
8 |
9 |
10 | This is a repo of all the YAML mentioned in the video.
11 |
12 | Files You Need
13 |
14 | **configuration.yaml**
15 |
16 | Contains the template directive
17 |
18 | **template.yaml**
19 |
20 | Contains the our template defined entities
21 |
22 | **script.yaml**
23 |
24 | The scripts referenced in the video just for, well, reference.
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/2023-MasterTemplates_StateBasedEntities/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Configure a default setup of Home Assistant (frontend, api, etc)
4 | default_config:
5 |
6 | template: !include template.yaml
--------------------------------------------------------------------------------
/2023-MasterTemplates_StateBasedEntities/script.yaml:
--------------------------------------------------------------------------------
1 | # Scripts referenced
2 |
3 | update_critical_battery_group:
4 | sequence:
5 | # Reset group
6 | - service: group.set
7 | data:
8 | object_id: "critical_batteries"
9 | entities: []
10 | # Add Battery in the Critical Battery Group
11 | - service: group.set
12 | data:
13 | object_id: "critical_batteries"
14 | add_entities: >-
15 | {{ states.sensor |
16 | selectattr('entity_id', 'in', area_entities('Critical Batteries')) |
17 | map(attribute='entity_id') | list | join(',') }}
18 |
19 | battery_notification:
20 | sequence:
21 | - service: script.get_jeff_briefing
22 | response_variable: "jeff_briefing"
23 | - condition: template
24 | value_template: >
25 | {{ jeff_briefing.critical_battery_count | int > 0 }}
26 | - variables:
27 | message: >
28 | {% set batts = expand('group.critical_batteries')
29 | | rejectattr('state', 'eq', '100')
30 | | selectattr('state', 'lt', '30') | list %}
31 | {% for bat in batts %}
32 | {{ bat.name }} - {{ bat.state }}%
33 | {% endfor %}
34 | - service: script.cleanup_text
35 | data:
36 | message: >
37 | {{ message }}
38 | response_variable: "cleaned_message"
39 | - service: script.text_notify
40 | data:
41 | who: "jeff"
42 | message: >
43 | {{ cleaned_message.text }}
44 | title: "Battery List"
45 | - service: persistent_notification.dismiss
46 | data:
47 | notification_id: "battery_notification"
48 | - service: persistent_notification.create
49 | data:
50 | notification_id: "battery_notification"
51 | message: "{{ message }}"
52 | title: "Battery List - To Change"
--------------------------------------------------------------------------------
/2023-MasterTemplates_StateBasedEntities/template.yaml:
--------------------------------------------------------------------------------
1 | # For more information on the data you can include in this entities check out
2 | # https://www.home-assistant.io/integrations/template/
3 | #
4 | # These are the templates shown in the video
5 |
6 | - sensor:
7 | - name: desk_light_energy
8 | unique_id: desk_light_energy
9 | state: "{{ state_attr('light.desk_backlight','energy')}}"
10 |
11 | - name: basement_temp_celsius
12 | unique_id: basement_temp_celsius
13 | state: >
14 | {% if has_value('sensor.basement_air_device_temperature') %}
15 | {{ ((states('sensor.basement_air_device_temperature') | int - 32) / 1.8) | round(0) }}
16 | {% endif %}
17 |
18 | - name: days_until_halloween
19 | unique_id: days_until_halloween
20 | unit_of_measurement: Days
21 | state: >
22 | {{ ((as_timestamp(now().replace(month=10, day=31)) - as_timestamp(now()) | int) / 86400) | round(0) }}
23 | - name: days_until_christmas
24 | unique_id: days_until_christmas
25 | unit_of_measurement: Days
26 | state: >
27 | {{ ((as_timestamp(now().replace(month=12, day=25)) - as_timestamp(now()) | int) / 86400) | round(0) }}
28 |
29 | - name: Critical Battery Count
30 | unique_id: critical_battery_count
31 | state: >
32 | {{ expand('group.critical_batteries')
33 | | rejectattr('state', 'eq', '100')
34 | | selectattr('state', 'lt', '30') | list | count }}
35 |
36 |
37 | - binary_sensor:
38 | - name: fridge_freezer_warming
39 | unique_id: fridge_freezer_warming_sensor
40 | state: >
41 | {{ states('sensor.acurite_986_fridge_freezer_f') | int > 15 }}
42 | device_class: problem
43 |
44 | - name: chest_freezer_warming
45 | unique_id: chest_freezer_warming_sensor
46 | state: >
47 | {{ states('sensor.acurite_986_chest_freezer_f') | int > 15 }}
48 | device_class: problem
49 |
50 | - name: school_tomorrow
51 | unique_id: school_tomorrow
52 | state: >
53 | {% set next_event=as_timestamp(state_attr('calendar.school','start_time')) | timestamp_custom("%Y-%m-%d",true) %}
54 | {% set tomorrow=(now().date() + timedelta(days=1)) | string %}
55 | {{ next_event == tomorrow }}
56 |
57 | - name: ps5
58 | unique_id: ps5_power_sensor
59 | state: >
60 | {{ states('sensor.playstation_power_power') | int > 10 }}
61 | device_class: running
62 | - name: deck_roku_status
63 | unique_id: deck_roku_status
64 | state: >
65 | {{ is_state('media_player.roku_deck','playing') }}
66 | device_class: running
67 | - name: livingroom_tv_status
68 | unique_id: livingroom_tv_status
69 | state: >
70 | {{ states('sensor.power_switch_electric_consumption_w') | int > 100 }}
71 | device_class: running
72 | - name: theater_tv_status
73 | unique_id: theater_tv_status
74 | state: >
75 | {{ is_state('media_player.theater_tv','on') }}
76 | device_class: running
77 |
78 | - name: kitchen_occupied
79 | unique_id: kitchen_occupied
80 | icon: mdi:account-group
81 | state: >
82 | {{ states.binary_sensor |
83 | selectattr('entity_id', 'in', area_entities('kitchen')) |
84 | rejectattr('attributes.device_class', 'undefined') |
85 | selectattr('attributes.device_class', 'search', '(occupancy|motion|door)') |
86 | selectattr('state', 'eq', 'on') |
87 | map(attribute='entity_id') |
88 | list | count > 0}}
89 | delay_off: '00:01:00'
90 | attributes:
91 | people_count: >
92 | {{ expand('group.room_presence')
93 | | selectattr('state', 'eq', 'living_room')
94 | | list
95 | | count }}
96 |
97 | - name: studio_occupied
98 | unique_id: studio_occupied
99 | icon: mdi:account-group
100 | state: >
101 | {{ (expand('group.room_presence')
102 | | selectattr('state', 'eq', 'studio')
103 | | list
104 | | count >= 1 )
105 | or
106 | (states.binary_sensor |
107 | selectattr('entity_id', 'in', area_entities('studio')) |
108 | rejectattr('attributes.device_class', 'undefined') |
109 | selectattr('attributes.device_class', 'search', '(occupancy|motion|door|running)') |
110 | selectattr('state', 'eq', 'on') |
111 | map(attribute='entity_id') |
112 | list | count > 0 )}}
113 | attributes:
114 | people_count: >
115 |
116 |
--------------------------------------------------------------------------------
/2023-ResponseVariables/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Response Variable Examples
4 |
5 |
6 | [](https://youtu.be/ey8MoQUDsRM)
7 |
8 |
9 |
10 |
11 | Files You Need
12 |
13 | **automations.yaml**
14 |
15 | Contains the Automations discussed in the video.
16 |
17 | ** scripts.yaml **
18 |
19 | Contains the scripts discussed in the video.
20 |
21 | If you are not using these files check the configuration.yaml for how to tell home assistant to use them.
22 |
23 |
24 |
--------------------------------------------------------------------------------
/2023-ResponseVariables/automations.yaml:
--------------------------------------------------------------------------------
1 | - id: 8a08e182-8b64-43e0-8835-42a46acf228b
2 | alias: really_cool_automation
3 | trigger:
4 | - platform: state
5 | entity_id: button.get_tagline
6 | id: easy_button
7 | - platform: state
8 | entity_id: binary_sensor.aqara_vibrator
9 | to: 'on'
10 | id: baited_by_the_master
11 | - platform: state
12 | entity_id: sensor.3d_printer_state
13 | to: 'finished'
14 | id: nice
15 | action:
16 | - variables:
17 | slackerlabs: "Automate the Boring Stuff!"
18 | paulhibbert: "ooooh the Zigbee."
19 | everythingsmarthome: "nice"
20 | - choose:
21 | - conditions:
22 | - condition: trigger
23 | id: easy_button
24 | sequence:
25 | - service: notify.jeff_ios
26 | data:
27 | message: '{{ slackerlabs }}'
28 | - conditions:
29 | - condition: trigger
30 | id: baited_by_the_master
31 | sequence:
32 | - service: script.ohyeah
33 | - conditions:
34 | - condition: trigger
35 | id: nice
36 | sequence:
37 | - service: notify.jeff_ios
38 | data:
39 | message: '{{ everythingsmarthome }}'
40 | default: []
41 |
42 | - id: dff6ec8c-afbe-40ab-9d9d-bda94539e9a0
43 | alias: really_really_cool_automation
44 | trigger:
45 | - platform: state
46 | entity_id: button.get_tagline
47 | id: easy_button
48 | - platform: state
49 | entity_id: binary_sensor.aqara_vibrator
50 | to: 'on'
51 | id: baited_by_the_master
52 | - platform: state
53 | entity_id: sensor.3d_printer_state
54 | to: 'finished'
55 | id: nice
56 | action:
57 | - service: script.get_taglines
58 | response_variable: "taglines"
59 | - choose:
60 | - conditions:
61 | - condition: trigger
62 | id: easy_button
63 | sequence:
64 | - service: notify.jeff_ios
65 | data:
66 | message: '{{ taglines.slackerlabs }}'
67 | - conditions:
68 | - condition: trigger
69 | id: baited_by_the_master
70 | sequence:
71 | - service: script.ohyeah
72 | - conditions:
73 | - condition: trigger
74 | id: nice
75 | sequence:
76 | - service: notify.jeff_ios
77 | data:
78 | message: '{{ taglines.everythingsmarthome }}'
79 |
80 | - id: 618bd49f-3b0a-4b09-85ce-52f4e3b2f38c
81 | alias: Smart Kitchen Lighting
82 | description: ''
83 | trigger:
84 | # The jina here might work better as a binary_sensor entity, because you could
85 | # visually see the currnt state and be able to check timestamps. But this should work
86 | # and trigger your automation any time a motion, occupancy, or door sensor in the
87 | # kitchen area turns on.
88 | - platform: template
89 | value_template: >
90 | {{ states.binary_sensor |
91 | selectattr('entity_id', 'in', area_entities('kitchen')) |
92 | rejectattr('attributes.device_class', 'undefined') |
93 | selectattr('attributes.device_class', 'search', '(occupancy|motion|door)') |
94 | selectattr('state', 'eq', 'on') |
95 | map(attribute='entity_id') |
96 | list | count > 0}}
97 | id: Light_Needed
98 | - platform: template
99 | value_template: >
100 | {{ states.binary_sensor |
101 | selectattr('entity_id', 'in', area_entities('kitchen')) |
102 | rejectattr('attributes.device_class', 'undefined') |
103 | selectattr('attributes.device_class', 'search', '(occupancy|motion|door)') |
104 | selectattr('state', 'eq', 'on') |
105 | map(attribute='entity_id') |
106 | list | count > 0}}
107 | for: '00:01:00'
108 | id: lights_dim
109 | - platform: template
110 | value_template: >
111 | {{ states.binary_sensor |
112 | selectattr('entity_id', 'in', area_entities('kitchen')) |
113 | rejectattr('attributes.device_class', 'undefined') |
114 | selectattr('attributes.device_class', 'search', '(occupancy|motion|door)') |
115 | selectattr('state', 'eq', 'on') |
116 | map(attribute='entity_id') |
117 | list | count > 0}}
118 | for: '00:05:00'
119 | id: light_not_needed
120 | condition: []
121 | action:
122 | # This action calls our get_room_lights script and gets a list of all the light entities in your kitchen
123 | - service: script.get_room_lights
124 | data:
125 | room: kitchen
126 | response_variable: "room"
127 | - choose:
128 | - conditions:
129 | - condition: trigger
130 | id: Light_Needed
131 | sequence:
132 | - service: light.turn_on
133 | data:
134 | brightness_pct: 100
135 | target:
136 | entity_id: '{{room.lights}}' # this uses the response the get_room_lights script to the entity ids.
137 | - conditions:
138 | - condition: trigger
139 | id: Light_Needed
140 | - condition: state
141 | entity_id: input_boolean.audible_notifications
142 | state: 'off'
143 | sequence:
144 | - service: light.turn_on
145 | data:
146 | brightness_pct: 50
147 | target:
148 | entity_id: '{{room.lights}}'
149 | - conditions:
150 | - condition: trigger
151 | id: lights_dim
152 | sequence:
153 | - service: light.turn_on
154 | data:
155 | brightness_pct: 20
156 | target:
157 | entity_id: '{{room.lights}}'
158 | - conditions:
159 | - condition: trigger
160 | id: light_not_needed
161 | sequence:
162 | - service: light.turn_off
163 | target:
164 | entity_id: '{{room.lights}}'
165 | default: []
166 | mode: restart
167 |
--------------------------------------------------------------------------------
/2023-ResponseVariables/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Configure a default setup of Home Assistant (frontend, api, etc)
4 | default_config:
5 |
6 | automation: !include automations.yaml
7 | script: !include scripts.yaml
--------------------------------------------------------------------------------
/2023-ResponseVariables/scripts.yaml:
--------------------------------------------------------------------------------
1 | get_taglines:
2 | sequence:
3 | - variables:
4 | slackerlabs: "Automate the Boring Stuff!"
5 | paulhibbert: "ooooh the Zigbee."
6 | everythingsmarthome: "nice"
7 | taglines: >
8 | {"slackerlabs": "{{slackerlabs}}",
9 | "paulhibbert":"{{paulhibbert}}",
10 | "everythingsmarthome":"{{everythingsmarthome}}"}
11 | - stop: "Alight. Im done."
12 | response_variable: "taglines"
13 |
14 | # jarvis_speaker only gets Echos by limiting to media players with the last_called attribute
15 | # audio speaker gets any device with the class speaker
16 | get_room_services:
17 | sequence:
18 | - variables:
19 | room_services: >-
20 | {% set jarvis_speaker = states.media_player |
21 | selectattr('entity_id', 'in', area_entities(room)) |
22 | rejectattr('attributes.last_called', 'undefined') |
23 | map(attribute='entity_id') |
24 | list | first %}
25 |
26 | {% set audio_speaker = states.media_player |
27 | selectattr('entity_id', 'in', area_entities(room)) |
28 | rejectattr('attributes.device_class', 'undefined') |
29 | selectattr('attributes.device_class', 'search', '(speaker)') |
30 | map(attribute='entity_id') |
31 | list | first %}
32 |
33 | {% set tts = 'amp' %}
34 | {"area":"{{room}}","jarvis_speaker":"{{jarvis_speaker}}","jarvis_tts":"{{tts}}","audio_speaker":"{{audio_speaker}}"}
35 | - stop: "ok, Im done."
36 | response_variable: "room_services"
--------------------------------------------------------------------------------
/2023-ResponseVariables/secrets.yaml:
--------------------------------------------------------------------------------
1 | # Use this file to store secrets like usernames and passwords.
2 | # Learn more at https://www.home-assistant.io/docs/configuration/secrets/
3 | some_password: welcome
4 |
5 | # Update these if you are going to use Amazon Polly config in
6 | # the configuration.yaml
7 | aws_key: fbvekjbvwblv
8 | aws_secret: nfegvwvlwbljew
9 |
--------------------------------------------------------------------------------
/2024-LocalVoiceConfig/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Local Voice Assistant Config
4 |
5 |
6 | [](https://youtu.be/Bd9qlR0mPB0)
7 |
8 |
9 |
10 | This is a repo of all the YAML mentioned in the video.
11 |
12 | Files You Need
13 |
14 | **configuration.yaml**
15 |
16 | Contains converstion and intent_script examples
17 |
18 | **automation.yaml**
19 |
20 | Contains example of voice Automations:
21 |
22 |
--------------------------------------------------------------------------------
/2024-LocalVoiceConfig/automations.yaml:
--------------------------------------------------------------------------------
1 | - id: '1712687167938'
2 | alias: Basic Jarvis
3 | description: ''
4 | trigger:
5 | - platform: conversation
6 | command: what time is it
7 | id: time
8 | - platform: conversation
9 | command:
10 | - read me a haiku
11 | - give me a haiku
12 | - do you know a haiku
13 | id: haiku
14 | condition: []
15 | action:
16 | - set_conversation_response: ''
17 | - choose:
18 | - conditions:
19 | - condition: trigger
20 | id:
21 | - time
22 | sequence:
23 | - service: script.return_the_time
24 | metadata: {}
25 | data: {}
26 | - conditions:
27 | - condition: trigger
28 | id:
29 | - haiku
30 | sequence:
31 | - service: script.return_haiku
32 | metadata: {}
33 | data: {}
34 | mode: single
35 | - id: '1719540841594'
36 | alias: TTS_Thetime
37 | description: ''
38 | trigger:
39 | - platform: conversation
40 | command: what time is it
41 | condition: []
42 | action:
43 | - set_conversation_response: ''
44 | - service: tts.cloud_say
45 | metadata: {}
46 | data:
47 | cache: false
48 | message: It is {{ now().strftime("%I:%M %p") }}.
49 | entity_id: media_player.studio_speaker
50 | mode: single
--------------------------------------------------------------------------------
/2024-LocalVoiceConfig/configuration.yaml:
--------------------------------------------------------------------------------
1 |
2 |
3 | automation: !include automations.yaml
4 |
5 | conversation:
6 | intents:
7 | whereami:
8 | - "where am I"
9 | - "Where are you"
10 | - "what room is this"
11 | areyouawake:
12 | - "are you awake"
13 | - "are you up"
14 |
15 | intent_script:
16 | whereami:
17 | speech:
18 | text: >
19 | {% set room = expand(label_entities('Jarvis')) | sort(attribute='last_changed') |
20 | map(attribute='entity_id') | list| last | area_name() %}
21 | {{ [
22 | "You are currently in the " ~ room ~ ".",
23 | "It appears you are in the " ~ room ~ ".",
24 | "I can see you in " ~ room ~ ".",
25 | "Are you having a laugh? You are in the " ~ room ~ "."
26 | ] | random }}
27 | areyouawake:
28 | speech:
29 | text: >
30 | {{ [
31 | "For you, always.",
32 | "Yes. I am awake. How may I be of service?",
33 | "Of course.",
34 | "I am indeed online."
35 | ] | random }}
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |

3 |
Slacker Labs Video Configuration Examples
4 |
5 |
6 |
7 |
8 | The repository includes:
9 |
10 | - [Home Assistant 101: Remote Access](https://github.com/thejeffreystone/SlackerLabVideoExamples/tree/main/2022-04-HA_101-RemoteAccess) Released Apr, 30 2022
11 | - [Home Assistant Alerts](https://github.com/thejeffreystone/SlackerLabVideoExamples/tree/main/2022-04-Home_Assistant_Alerts) Released Apr, 13 2022
12 | - [Home Assistant Integrations You're Not Using](https://github.com/thejeffreystone/SlackerLabVideoExamples/tree/main/2021-10-5_Home_Assistant_Integrations_Youre_Not_Using) Released Oct, 5 2021
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/images/slacker_labs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/slacker_labs.png
--------------------------------------------------------------------------------
/images/videos/2024-JarvisLocalSpeaker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/2024-JarvisLocalSpeaker.png
--------------------------------------------------------------------------------
/images/videos/tn-2022-AutomatingTimers2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-2022-AutomatingTimers2.png
--------------------------------------------------------------------------------
/images/videos/tn-2022-MQTTErrors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-2022-MQTTErrors.png
--------------------------------------------------------------------------------
/images/videos/tn-2023-TemplatesEntities.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-2023-TemplatesEntities.png
--------------------------------------------------------------------------------
/images/videos/tn-2023-response_variables3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-2023-response_variables3.png
--------------------------------------------------------------------------------
/images/videos/tn-5integrations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-5integrations.png
--------------------------------------------------------------------------------
/images/videos/tn-Alerts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-Alerts.png
--------------------------------------------------------------------------------
/images/videos/tn-LumaryReview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-LumaryReview.png
--------------------------------------------------------------------------------
/images/videos/tn-RecallSystem.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-RecallSystem.jpg
--------------------------------------------------------------------------------
/images/videos/tn-RemoteAccess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-RemoteAccess.png
--------------------------------------------------------------------------------
/images/videos/tn-confession.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thejeffreystone/SlackerLabVideoExamples/76804ff66f59d6b0ea0d592a7030e7b089d1de44/images/videos/tn-confession.png
--------------------------------------------------------------------------------