Easier Advance Automations with Trigger IDs in Home Assistant

preview_player
Показать описание
Until Recently, advanced automations in Home Assistant required you to use the YAML, and jinja. But back in the 2021.7 release of Home Assistant, we got trigger ids. Now writing advanced automations is much easier.

In this video, we are going to go through some examples of how trigger ids can change how you automate the boring stuff and hopefully enable you to make your smart home smarter.

Chapters:
00:00 - Advance Automations with Trigger IDs in Home Assistant - Intro
01:05 - Home Assistant Automation Basics
02:14 - Better Home Assistant Automations with Trigger IDs

#homeassistant #smarthome #homeautomation

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:

And if you like this video you could always fuel my automation habit -

One Time Donation:
Cash App: $slackerlabs
.

Video Gear:

Рекомендации по теме
Комментарии
Автор

Awesome, was always brushing past the trigger ID field without paying much attention to it, now I realized it would actually help me consolidate a lot of my automations into a single one. Thanks, Jeff!

strasharo
Автор

This is great!!! I'm about to migrate from ST to HA and have to redo the door alerts when alarm is armed. This will be so helpful to put in a single automation.

NeilNatic
Автор

Thanks so much for this! I was thinking I would have to dig up the jinja template to know which device triggered the automation in my notifications for cameras detecting motion. Exactly what I needed!

jefferygrantham
Автор

Trigger ID's are actually quite a good thing. In the new version (2023.x) the option is now just called Edit ID, but the rest works the same.
Just wanted to add one thing with Trigger ID's. YOu have to be careful what you are automating and the MODE of your automation also.
If you use a tirgger ID say for motion cleared and motion detected in the same automation, if your cleared is Motion Clear for 5 minutes as an example, the automation can think it is running during that 5 minute wait cycle. This means that if you manually turn off the light, and then trigger with the motion sensor while the automation things it is still running, it will fail to run again in single mode. This means you have to really think carefully about how many trigger ID's are in one automation and how they interact with each other

EsotericArctos
Автор

Thanks for sharing with us. Only have a handful of automations at the moment. Have installed a few more smart switch switches, dimmers and a few zigbee devices. Now I need to create some more automations and do some fancy rules in Tasmota for a couple of the smart dimmers that have 3 buttons so I can have multiple settings using hold and multi-press.

andymok
Автор

Keep going big brother. The subscribers will follow. :)

siddharthbajaj
Автор

you rock jeff! best wishes from your most loyal brazilian fan!

RicardoMaranhaoMD
Автор

Seriously explained so well Jeff! This helped me understand so much versus just reading the release notes. Also did you figure out the Assistant Relay Add-on? curious to see how you would use it! Thanks again for your time on all these videos! Excellent work.

MarkGhali
Автор

I appreciate all the content but I have a question I hope you can answer. I set up an automation that triggers a Lutron scene, however I don't know how to have it triggered when a specific video on my plex plays. Any thoughts? I've tried several ways including using the video's Plex id but to no avail.

davidfranks
Автор

This is an improvement. Could have saved some work.

jmr
Автор

Thanks for the video. I’ve a small question. I’ve an automation. if x person left from home and if window/door is open, sent a notification. But looks like if i’m not connected with vpn or nabu case, it’s not working I mean Even though I am away from home, I seem to be at home. Does not update location. If i connected vpn, it’s working. But very strange, other notifcations are working without vpn. I can get notifcations I can receive mobile notifications without access to HA server. What’s wrong? I mean if it can work without vpn/nabu casa account, why location base automation is not working? How can I receive other notifications when I’m not connected with VPN and I don’t have HA access?

okanerdem
Автор

Great video and incredibly helpful for my own projects. I was wondering if there's also a way to group entities (instead of calling the comma delimited list in the entity field 5:57) while being able to determine which entity of the group caused the trigger in the action step?

ssmon
Автор

Jeff, thanks for your videos, I use HA for 5 years now, I used automation in yaml, then I migrated all to node red, the UI to edit complex automation with node red is more simple, visual, what do you think about vs HA automation?

Coolweb
Автор

Would this work?

alias: Afternoon Lights On
description: ''
trigger:
- platform: sun
event: sunset
offset: '-03:00:00'
id: '-3'
- platform: sun
event: sunset
offset: '-02:30:00'
id: '-2.5'
- platform: sun
event: sunrise
offset: '-02:00:00'
id: '-2'
- platform: sun
event: sunrise
offset: '-01:30:00'
id: '-1.5'
- platform: sun
event: sunrise
offset: '-01:00:00'
id: '-1'
- platform: sun
event: sunrise
offset: '-00:30:00'
id: '-.5'
- platform: sun
event: sunrise
offset: '0'
id: '-0'
condition: []
action:
- choose:
- conditions:
- condition: numeric_state
entity_id:
above: '89'
- condition: trigger
id: '-3'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
- conditions:
- condition: numeric_state
entity_id:
below: '90'
- condition: trigger
id: '-2'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
default: []
- choose:
- conditions:
- condition: numeric_state
entity_id:
above: '89'
- condition: trigger
id: '-2.5'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
- conditions:
- condition: numeric_state
entity_id:
below: '90'
- condition: trigger
id: '-1.5'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
default:
- choose:
- conditions:
- condition: numeric_state
entity_id:
above: '89'
- condition: trigger
id: '-2'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
- conditions:
- condition: numeric_state
entity_id:
below: '90'
- condition: trigger
id: '-1'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
default: []
- choose:
- conditions:
- condition: numeric_state
entity_id:
above: '89'
- condition: trigger
id: '-1'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
entity_id:
- light.driveway
- light.backyard
- conditions:
- condition: numeric_state
entity_id:
below: '90'
- condition: trigger
id: '-.5'
sequence:
- service: light.turn_on
data:
transition: 1800
color_temp: 350
brightness_pct: 100
target:
device_id:
entity_id:
- light.driveway
- light.backyard
default: []
- choose:
- conditions:
- condition: numeric_state
entity_id:
above: '89'
- condition: trigger
id: '-.5'
sequence:
- type: turn_on
device_id:
entity_id: switch.dog_christmas_lights
domain: switch
- conditions:
- condition: numeric_state
entity_id:
below: '90'
- condition: trigger
id: '-0'
sequence:
- type: turn_on
device_id:
entity_id: switch.dog_christmas_lights
domain: switch
default: []
mode: single

Dloada
Автор

Yaml is a terrible decision to write automations. Specially because how lacky the primitives are, forcing you to write code within templates. I find using any programming language easier

Danielo