Easy home Assistant Notifications using Alerts!

  Рет қаралды 35,359

SlackerLabs

SlackerLabs

Күн бұрын

If you want to get notifications that repeat until a condition is cleared (think door open after dark, or security issue, then you will want to check out the built in Home Assistant integrations Alerts.
In this video we walk through how to get them setup, and I share some example of alerts I have built.
Also, I have a written guide for those that want to something to read, as well as I posted all the config files used in this video in their own repo. So they wont change even if you found this video months after ti was published.
Written Guide: slacker-labs.com/2022/04/13/h...
Github Repo: github.com/thejeffreystone/Sl...
Download the files: slacker-labs.com/wp-content/u...
And as always for those that want to skip around:
Video Chapters:
00:00 - Home Assistant Alerts make Easy Notification Automations - Intro
01:04 - Home Assistant Alerts Explained
02:09 - Home Assistant Alert Limitations
03:40 - Enable Alert Integration in Home Assistant
05:55 - Examples of Home Assistant Alerts
12:09 - Text to Speech as a Notification Service
#homeassistant #alerts #easyautomation
Who am I?
My Name is Jeff. I am an DIY-er and Automator of boring things. And, of course, a huge Home Assistant fan. Oh, I also live in a house that tweets.
Follow Me:
Github - github.com/thejeffreystone
Twitter - / thejeffreystone / / slackerlabs
On the Web - slacker-labs.com/
Discord - / discord
And if you like this video you could always fuel my automation habit -
Grab SlackerLabs Merch: slackerlabsmerch.square.site
One Time Donation:
Paypal: www.paypal.com/paypalme/Slack...
Cash App: $slackerlabs
Buy me a coffee: www.buymeacoffee.com/icE6DeBut
.
Or use my Amazon affiliate link which provides a small commission on things you buy without additional cost to you - www.amazon.com/s/ref=as_li_ss...
Video Gear:
Canon m50: amzn.to/3ftldPH
Desk Mic: amzn.to/3wkum40
Camera Mic: amzn.to/3tXk1cp
Newer 660: amzn.to/3fwwejd
Dazzne D50: amzn.to/3oGBK5y
Audio Interface: amzn.to/3u07chK
Gimble: amzn.to/3ouKAoe
Music - Epidemic Sound: www.epidemicsound.com/referra...
Video Assets - LenoFx: i.refs.cc/CJXU6Da9?smile_ref=e...

Пікірлер: 71
@ALaModePi
@ALaModePi 2 жыл бұрын
Excellent idea including the Github. I often use variations of your hints and this makes it extremely easy. Thanks Also, thanks for including the written versions. I'm not a fan of having to pause and scroll back and listen again, repeat, repeat.
@ArkodeLeeuw
@ArkodeLeeuw 2 жыл бұрын
Hi Jeff, great idea to start with a fresh install. I went down the rabbithole setting up Amazon Polly notifications based upon your Jarvis video and used your Github repo as a starting point. That was not the best way to go I found out, there were just to many dependencies, but it gave me a starting point. As of now you are my favorite HA channel and I be there finding your faults :-)
@Tntdruid
@Tntdruid 2 жыл бұрын
I like the new way you share conf files. 👍
@vpsrj
@vpsrj 2 жыл бұрын
Another awesome video. The way u explain problems and evolve the solution are perfect!
@My427Cobra
@My427Cobra 2 жыл бұрын
Jeff, I really like the new housekeeping methodology. I look forward to utilizing these new items as needed.
@eclecticlife
@eclecticlife 2 жыл бұрын
Another great video Jeff! Thank you!
@andrewcox8834
@andrewcox8834 2 жыл бұрын
Hey Jeff, I came across your channel a month or so ago and have become a big fan. I've used several of your ideas in my implmentation and it has inspired to to dig deeper into really understanding templating (after 5 years on the platform 😅), I really enjoy that your channel is one of the few that provides guidance for advanced automations. But as you seem to have received feedback, I've found it somewhat difficult to parse out the useful pieces for my instance. So your change of platform/solution delivery, making that barrier to entry much more accessible to people like me who have interest but might not understand all of the nuanced details yet can now more easily achieve our goals. So thank you, very much appreciated!
@PetesWorkshop
@PetesWorkshop 2 жыл бұрын
Good stuff. Thanks for sharing. I will change some of my automations to alerts for sure.
@ByStand3R
@ByStand3R 2 жыл бұрын
Have been following the channel for quite a while now. Learning so much but I do like the new approach as well. See the config from the full setup is a little overwhelming. Hopefully extending from the 101 video and this one we can follow along as it’s build in complexity. Would love to see how you break out the config.yaml into the seperate files and the packages as the neatness seems slicker than cramming it all into the main file. Thansk again
@emms-place
@emms-place 2 жыл бұрын
Nice info in this video. I will definitely use the notification for the garage door open. My wyze sensor does the same thing for my sliding door. With this info i can apply to my sonoff contact sensor on the garage door.
@yorks_atheist3069
@yorks_atheist3069 Жыл бұрын
thanks this is spot on, I have 3 x 433MHz smoke alarms in external buildings that I need so have repeated notifications if they go off till I investigate and clear the condition. Automations was just sending once was worried I'd miss it.
@deno-adenoz
@deno-adenoz 2 жыл бұрын
In the first few minutes you offered some great use cases for AppDaemon.
@lauradi308
@lauradi308 2 жыл бұрын
Great video. Really looking forward to trying alerts for something that has come up here recently. We’re trying to move away from using recurring time-based Alexa ‘reminders’…mostly because they are not necessary if we remember to do what we want to be reminded to do. I bought a bunch of IKEA shortcut buttons and I’m trying to put together what my husband calls the “nag button” service. Basically I was trying to create alerts in the visual editor w/o actually knowing how to do alerts. First two reminders are to prep the coffee maker for the next day’s coffee (which starts as soon as the first person up enters the kitchen in the morning *if* the coffee has been prepped the night before) and ‘persistently’ reminding my husband to take his allergy medication twice a day. The buttons are a positive reinforcement: you perform the specified task, the ‘nagging’ alert is disabled until it needs to be reset for the next day.
@MrToup
@MrToup 2 жыл бұрын
Interesting Video, I did not know about alert. When it comes to notifications, my current favorite way is to use automation so I can clear notifications when the action is done. For example I send to all phone the washing machine is finished, but if I detect someone is emptying it, I simply clear the notification. This way the others are not overwhelmed with notifications which does not need any actions anymore.
@RNMSC
@RNMSC 2 жыл бұрын
A potential use for an interactive notification would be the garage door notification. If you have a garage door opener, they nearly always allow you to activate the door (open or close) with a momentary switch. (i.e. what you may have on the wall next to the door into the garage.) I remember having an X10 momentary relay that I was able to plug into an outlet in the garage, and wire to those contacts, so that the alarm system we had in that house could open or close the garage door. I didn't have a sensor to detect if the door was open or not, but from the kitchen I could see that, so.. In any case the interactive option might be to be able to send a yes or no response to the question 'should I try to close the garage door?' followed that activates a relay momentarily (half a second perhaps, might need some testing) via an ESPHome (or possibly an off the shelf option) device that may even get power from other contacts on the garage door (a lot of those garage door buttons 'light up' so that you can find them even in the dark.) The routine could even be extended with a follow-up notification depending on results, 'garage door is now closed. That was easy. You might have been able to handle it.' or 'I attempted to close the garage door, but do not see the door as closed. You should check for an obstruction, or perhaps a sensor fault if you're really unlucky.' Or other snarky responses.
@carloss2
@carloss2 Жыл бұрын
If you understand an Alert as an emergency (an urgent situation) , then all of the "limitations" mentioned here are not really limitations, an alert is is not an automation. Instead of input boolean you should use binary sensor templates, of course you can acknowlege alerts, just go to the alert section in your dasboard, front end or the mobile app, and it should appear a button where before said "idle", and it will stop notifying
@DanGentry
@DanGentry 2 жыл бұрын
I have an alert that reminds me to take the trash bin to the curb. It knows what day and time the truck will come, and the time between alerts get shorter as the deadline looms. A distance sensor is used to see if the bin is in its place in the garage.
@edleckert6515
@edleckert6515 Жыл бұрын
You can Acknowledge an alert with the alert.turn_off service and many cards that support switches such as the Entities card. My choice would be the Tile card with a Tap Action to call the alert.turn_off service to turn off the alert entity -- this technique looks very clean. Put it inside a custom:auto-entities card and you can have selected alert entities appear only when not in "idle" state, for example. I'm running Home Assistant Core 2023.4.6. Note that the can_acknowledge setting is not used -- it is always assumed to be true. Here's an example card to show all non-idle alerts: - type: custom:auto-entities card: type: vertical-stack card_param: cards filter: include: - domain: alert options: type: tile tap_action: action: call-service service: alert.turn_off service_data: entity_id: this.entity_id exclude: - state: idle - state: unavailable - hidden_by: user
@Sparky_D
@Sparky_D 2 жыл бұрын
I prefer to use automations for these use cases. The beauty of them is being able to use wait_templates to ensure the TTS message only gets played once a person is detected by a motion sensor in the room I want the TTS to play.
@dsdlonyer
@dsdlonyer Жыл бұрын
Very helpful thank you. I now have a couple alerts monitoring my heating devices. Yes I inadvertently left my outdoor heater on for 3 days so learnt the hard way. I just have one question in relation to the notifiers: section. I use scripts when notifying so that if i change my phone I don't have to go through each automation individually. Can a script be called or is there another way?
@Gladers.
@Gladers. 2 жыл бұрын
Thank you! Didnt know about alerts. But as a slacker I am I'm thinking its easier to just do all alarms/notifications trough the Automation? no coding, just click how you want the automation to be? What's the diffrence doing it that way? And that garage door alarm, how do it know "its after dark" ? Can you specify at what time you want it to go out an alert?
@MrSupersidewinder
@MrSupersidewinder 2 жыл бұрын
Very cool stuff, THANKS!!! I just built my HA server, docker based ubuntu. Ordered sonoff zigbee dongle and some zigbee plugs to get started... Looking for docker compose examples to set up mqtt, zigbee2mqtt, esphome, motioneye. I got vs code server running but can't get to my /opt directory. NOOB...🤪
@thomasneville8796
@thomasneville8796 7 ай бұрын
I want to build voice activated timers. One of the things I need is an audio cue when the timer is complete. Alerts may be what I need.
@markday3145
@markday3145 2 жыл бұрын
0:45 Speaking of "a new Home Assistant installation," I would like to be able to experiment with automations, input helpers, custom cards, etc. I'd prefer not to mess up the installation that's running my home automation. I'd love to see a video about how to set up a separate installation for that kind of experimentation (perhaps via Docker?) Are there issues with having the same integration/device being used by multiple installations? How about ESPHome devices, and how they find the Home Assistant instance to work with? Any other tips for that kind of experimentation?
@Hans-gj3vk
@Hans-gj3vk Жыл бұрын
Thank you for this informative video. So, it's not possible to send an loud audio alert to you Android phone? My phone is 99.9% of all times in my pocket, so I cannot (slight chance) hear text messsages. Or do you have a video available for that (simple use case)?
@rajeshsaha6660
@rajeshsaha6660 Жыл бұрын
Great video. how do you add alexa devices in the Notifier list on the alert in configuration.yaml file?
@ArkodeLeeuw
@ArkodeLeeuw 2 жыл бұрын
And talking about technical debt, as Drew Johnson stated 4 months ago, it's not necessary to convert to timestamps anymore... The washing machine completed its cycle {%- set seconds = (now() - states.sensor.washer_status.last_changed).seconds -%} {%- set hours = seconds / 3600 -%} {%- if hours == 1 -%}
@paulholstein9448
@paulholstein9448 5 ай бұрын
In your video, you include how to turn off a notification if the garage doors are off but that script is not on your Github page. Can you add it there? I'm trying to figure out how to disable the washer notification when I open the washer door.
@lee-he3ey
@lee-he3ey Жыл бұрын
Excellent vid Jeff, I'm using the alerts.yaml for a simple fridge door left open warning that repeats every 5 minutes. No problem with getting notifications sent to my phone but trying to get this working with with alexa notifications is proving a challenge. Using the HACS AMP integration as an automations in HA I can easily get TTS notifications on my amazon echo devices, however trying to do this with alerts is a different story. It would be great if you could offer any help or do a short video
@SlackerLabs
@SlackerLabs Жыл бұрын
I will try to remember to talk about that when I walk through my new TTS setup.
@mtc-tech
@mtc-tech Жыл бұрын
@@SlackerLabs were you able to get Alexa media notification working with alerts? Struggilng with that now.
@sicilian71884
@sicilian71884 8 ай бұрын
Do you know how to get the twitter notifications working? Im using the free twitter dev account. Do i need a paid one for this to work?
@MadMike78
@MadMike78 9 ай бұрын
I tried adding the platform: tts to yaml but it doesn't accept it. Do i need to install something first?
@74357175
@74357175 2 жыл бұрын
Very cool. Have you filed a bug for the alert clearing? You know, to alert the developers 😄
@SlackerLabs
@SlackerLabs 2 жыл бұрын
I have not. I’m a bad user.
@okanerdem
@okanerdem 2 жыл бұрын
What do you use for leave/left automation? Life360? HA? or another? I'm using iphone but until now each way had an issue to update location.
@SlackerLabs
@SlackerLabs 2 жыл бұрын
I’m just using the HA app for now. Life360 is still connected but slowly phasing it out.
@okanerdem
@okanerdem 2 жыл бұрын
@@SlackerLabs Thanks for the answer.
@MrPecky
@MrPecky Жыл бұрын
Another great video, one question, I see you have a secrets.yaml file, but, I don't see how Home Assistant knows to read it in? There's no include statement in the configuration.yaml file...
@SlackerLabs
@SlackerLabs Жыл бұрын
Its built in. All you have to do is use the !secret keyword in your yaml followed by the key name in your secrets file.
@nigelholland24
@nigelholland24 2 жыл бұрын
Great video thanks just a FYI don’t know if important but your secrets file is visible.
@SlackerLabs
@SlackerLabs 2 жыл бұрын
Thanks for looking out for me. The one that repo is just a dummy one. But you definitely made me take another look.
@AlonsoVPR
@AlonsoVPR Жыл бұрын
I can't tell you how many times I've watched this video, I'm driving myself nuts on this but I have to ask. Is there any way to use a script based notifier with alerts?. Please tell me that there's a way. I have a sequential script that decides where to send the message depends on some states (away/ watching tv /etc...) It works pretty well but persistent notifications require automation loops until conditions are met and we all know that's not the best way to do persistent notifications I know you're gonna be my savior! ;)
@ChillnCross
@ChillnCross 16 күн бұрын
Did you ever find an answer to this?? Looking to do the same...
@grantclay66
@grantclay66 2 жыл бұрын
what's the advantage with alerts over the automation sending the notification direct to the phone (or TTS)?
@SlackerLabs
@SlackerLabs 2 жыл бұрын
Just less lines is you are yaml-ing it. And you don’t have to worry about building in repeat logic if you want the notifications to repeat on an interval. Oh. And I don’t think you can easily do the dynamic interval if you want the repeat interval to change each time. As in 5 minutes then 10 then 15.
@SantiagoPerezG
@SantiagoPerezG 2 жыл бұрын
Do you think it would be possible to create a notification service that actually triggers an event, and then have another automation that listens to that event and then can send TTS notification to a room-presence based media player ?
@SlackerLabs
@SlackerLabs 2 жыл бұрын
Yes. That is how my first iteration of the washer notification worked. An automation would see the the washer finished and publish an event. Then a different automation watched for that event and then made the notification
@SantiagoPerezG
@SantiagoPerezG 2 жыл бұрын
@@SlackerLabs I was actually hoping to be able to use Alerts but have a notifier service that actually triggers an event. That way the alert component would continue to trigger the event while the condition is still satisfied. That way we could leverage the features of Alerts.
@SantiagoPerezG
@SantiagoPerezG 2 жыл бұрын
@@SlackerLabs Googling for this I found this empty Group notifier trick, that can be used then to listen directly into "call_service" event type notify: - platform: group name: xxx services: [] automation: - trigger: platform: event event_type: call_service event_data: domain: notify service: xxx action: - service: ...
@scubieman
@scubieman Жыл бұрын
Can I have alerts with mutiple states? I want to have a alert if sensor goes from home to unknown,unavailable or away?
@SlackerLabs
@SlackerLabs Жыл бұрын
I don't think so. But I haven't tried. I am pretty sure its a once state thing. That's why I usually use a helper as my alert entity, and then have an automation that turns it on and off based on different conditions. I let the automation handle all of that logic, and just let the alert focus on if the helper was turned on or off.
@BluelightGaming1
@BluelightGaming1 Жыл бұрын
I'm confused what about this isn't possible in the UI. I'm probably missing something, but it seems like you can have HA send notifications via automations for any of this stuff... What makes this method better than the other? You also send TTS with notifications.
@SlackerLabs
@SlackerLabs Жыл бұрын
Yes all of it is possible in automations. But alerts can be setup to send reoccurring notifications until a condition clears without having to create/manage a loop inside your automation. Also automations are not persistent. So if something happens and automations are reloaded your loop stops. So for critical notifications alerts will be more solid as they will continue to notify you even after home assistant is restarted.
@pabll0
@pabll0 Жыл бұрын
can you make a tutorial ...how to install usb coral tpu on virtual machine and working with Frigate in home assistant?
@SlackerLabs
@SlackerLabs Жыл бұрын
That has been on my wish list. I am not sure my current setup would handle it though.
@ManfredBartz
@ManfredBartz 2 жыл бұрын
For me and my wife, the exact opposite to phone notifications would be useful. We do not always carry our phones while at home - they might be on a charger or lying in another room. It would be extremely useful to have a TTS announcement or flashing lights when a call comes in or an SMS arrives. Unfortunately, the HA app has a lot of (useless) "sensors" for the phone state, but no sensor for the phone actually "ringing". Can you suggest a solution? Ideally, a solution would also be able to filter on the calling number.
@SlackerLabs
@SlackerLabs 2 жыл бұрын
I don’t know of a way on iOS. You could use iOS shortcuts to kick off an automation or script when you receive a text. But I don’t think an incoming call is an option. On android you might be able to with tasker. I just can’t verify.
@gaborhorinka1079
@gaborhorinka1079 2 жыл бұрын
With Tasker, you can do it very easy with HA plugin. There is an event for ringing phone, and you can assign a task to call a service in home assistant.
@ManfredBartz
@ManfredBartz 2 жыл бұрын
​@@gaborhorinka1079, sounds good, I have tasker and Play store says "This app is available for your device" but the install button is greyed out. User comment says "The app doesn't work anymore and hasn't been maintained since January 2020."
@chrisrnz
@chrisrnz 2 жыл бұрын
Sorry if this posts twice. Anyway, if the intention is for users to download the entire repo, GitHub will zip the files for you. No need to manage/maintain a separate ZIP file yourself. In my opinion managing a separate ZIP file on another website is just adding to the technical debt you're trying to remove. :) Also, check out the GitHub docs on managing releases. Tagging a branch as latest will make sure users always stay up to date, if they're using your code/configuration: docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
@grant1984
@grant1984 10 ай бұрын
"download the files" link is dead
@ducsue751
@ducsue751 2 жыл бұрын
12:59 How to setup for amazon echo devices??
@SlackerLabs
@SlackerLabs 2 жыл бұрын
If you have the Alexa Media Player integration from HACS you should have a notify service for each of your echos. So you can just use that. It will be something like notify.kitchen_echo and you should be able to drop that into the notifiers as kitchen_echo. All though I haven’t tested it. But it should work.
@ducsue751
@ducsue751 2 жыл бұрын
@@SlackerLabs I have tried and I get no response from alexa. Usually it will say something about tts is not supported and refer to your alexa app for details. It didn't even say that. Update: you need to added this bit in the alert code. data: type: tts
@jeff68
@jeff68 Ай бұрын
anything but easy
@rrschmid
@rrschmid 2 жыл бұрын
cheers for the video! not really sure where I can see what my mobile is as what you have listed as yours as an example notifiers: - mobile_app_jeffreys_iphone_8 since mine is called "roland_mobile" under entities, is it that or is it mobile_app_roland_mobile?
@rrschmid
@rrschmid 2 жыл бұрын
found this video, thank you! kzfaq.info/get/bejne/qch8dcWbxrLapac.html
@SlackerLabs
@SlackerLabs 2 жыл бұрын
In the developer tools menu you can use services. It will show up as a notify. Service
Mastering Home Assistant Templates: A Beginner's Guide
23:56
SlackerLabs
Рет қаралды 45 М.
Build One Script to Rule Them All in home Assistant
11:21
SlackerLabs
Рет қаралды 24 М.
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 5 МЛН
бесит старшая сестра!? #роблокс #анимация #мем
00:58
КРУТОЙ ПАПА на
Рет қаралды 1,3 МЛН
Home Assistant Mobile Notification Deepdive!!
16:36
Fast How To
Рет қаралды 11 М.
5 WAYS To Send Notifications (Using Home Assistant)
36:05
Mark Watt Tech
Рет қаралды 70 М.
Everything You Need to Automate in Home Assistant
17:24
SlackerLabs
Рет қаралды 18 М.
Home Assistant Has Never Been This EASY!
11:58
Everything Smart Home
Рет қаралды 124 М.
4 more HACS components for your Home Assistant powered Smart Home
14:57
Home Assistant Actionable Notifications on iOS AND Android
10:30
Everything Smart Home
Рет қаралды 93 М.
Home Assistant Scripts Hidden Feature!
9:24
SlackerLabs
Рет қаралды 14 М.
Scenes on Steroids in Home Assistant - How To - Tutorial
13:42
Smart Home Junkie
Рет қаралды 34 М.
Home Assistant Automation Intro
13:53
SlackerLabs
Рет қаралды 25 М.
Настоящий детектор , который нужен каждому!
0:16
Ender Пересказы
Рет қаралды 434 М.
После ввода кода - протирайте панель
0:18
Разряженный iPhone может больше Android
0:34