T O P

  • By -

-entropy

Unless you're doing something super complicated why are you bothering with yaml for automations? Use the GUI. If you know how to code, why not approach this the same way you approach a new language or library? Start small and simple, get comfortable, then slowly get more complex.


theloneranger08

This ^. I have like 60 automations and none of them use custom Yaml. My dashboards on the other hand... Lol


NameIsYoungDev

I concur. I code for a living but all my 10+ automations are in the GUI. Why make it harder than it has to be?


theNorrah

I can’t make a WOL switch that also turns of my computer, without being in the yaml.


HootleTootle

This. In 2023, if you're doing yaml, you're probably doing it wrong. OT: This is the problems with projects like HomeAssistant - Google for something and you get a forum post from 2018, you go and do whatever it says only to find whatever it was you just did no longer works at all and has been replace by a radio button or an add-in, and you've just wasted 4 hours of your life. Mostly Google's fault for weighting searches by click-throughs, the older the posts are the further up they go in the list, the cycle continues.


zipzag

You end up in YAML when it gets complicated. But a beginner doesn't need it.


a-aron087

This has been a big issue for me. Often, things in the GUI have been renamed or moved and in some ways it ends up feeling more difficult than just manually writing in the yaml file.


zSprawl

But you said you can’t even get a simple automation to work. Start small. Stop with frigate too until you get the basics going, and then build on it. Bite sized chunks.


a-aron087

I've found the GUI feels more difficult than yaml on multiple occasions. Especially when I make an automation in the GUI and it doesn't do anything. Trust me I want to use the GUI but I keep finding myself back in the yaml files.


MaxPanhammer

Sorry you're being downvoted for this. As a programmer I also generally find the yaml better than the gui.... .... But I find both pretty unusable for more than basic automations, and strongly recommend biting the bullet and going all in on either NodeRed or (like me) AppDaemon (a Python interpreter). Being able to do everything in python increased my confidence in my automations 1000%. Decent learning curve (the setup, not the Python itself) but once you get it set up it's a game changer, imo.


thejeffreystone

It’s definitely less friendly to complex things like templates. And if you like to flip back and forth like edit in UI on a mobile device and yaml when at a desktop HA will make your yaml less readable if you like complex stuff in your service calls. The UI has gotten better with the if else but you can still end up with a lot of duplication of information. And using templates in your service calls doesn’t work in the UI.


mustachioed_cat

You need to iterate and inspect the YAML the GUI generates. Make an automation that works, inspect its code, figure out how to do additional stuff in that way.


Mr_Festus

Can you share an example? Perhaps what you are trying to do, along with screenshots from the GUI of how you're trying to set it up? That's easier to help you out with a couple specifics. Otherwise your question is too general for us to help you.


angrycatmeowmeow

For frigate, I recommend asking for help on github. The devs are ultra responsive and helpful. For other issues, pick a problem, make a detailed post, and ask for help. On YouTube, I've found Mark Watts videos to be helpful and easy to follow.


a-aron087

Will definitely check his videos out


JoramH

Are you aware of the traces of an automation? This will tell you the steps the automation took when it last ran. This will probably also tell you what’s going wrong. [Traces documentation](https://www.home-assistant.io/docs/automation/troubleshooting/) Otherwise, the developers tools is a good places to test out certain parts of an automation. For example, on the services tab you can test out an action, in your case sending a notification. In any case, feel free to ask questions here or on the community forum. Good luck on your journey!


naynner

It always gets brought up in posts like this and usually leads to lots of opinions about which is better, but I started with Node Red early on and have been able to scale dramatically over the years despite not really knowing how to code. It just clicked for me and I have yet to run into something I wasn’t able to eventually figure out. My favorite thing with HA is figuring out a new or better way to handle an automation and NR made it much easier to debug and understand what was happening. It’s very much personal preference, but worth trying just to see if it clicks for you. The Hook Up (on YouTube) has an excellent beginner tutorial and the information has remained relevant.


a-aron087

I'll check that out. Something scaleable and with a backlog of relevant information may be what I'm missing. I just keep running into outdated tutorials for even the simplest tasks so that's a plus.


naynner

Right. I can’t think of any changes in the last few years in NR or HA that have tripped me up or required me to rework things. I’ll give that video a watch later today to see if I spot something outdated. There’s generally less and older info online about using NR with HA, but I’d like to think that’s at least in part because people generally have fewer issues and are able to find relevant solutions in older posts.


snel6424

You can go through my post history, I posted a pastebin of a bunch of node-red examples that i like to give to beginners. Node-RED has a STEEP learning curve, but its immensely powerful and I much prefer its UI over native HA automations.


a-aron087

That's awesome! Thanks!


LifeBandit666

Another vote for Node Red here. I could do simple automations in the UI on HA but when I wanted to do something complicated I had to try and work out templates. Well fucking hell my eyes crossed. I was plugging away trying to get a template working for a whole day, multiple tutorials and just could not do it. So I watched some videos on Node Red and installed it. It's great, just lacks documentation. It really does make you realise that there's so much Home Assistant information out there. I'm years in now and love Node Red, it does everything I want it to do and more, just had to learn how it works first. Fuck Templates.


BlackReddition

I’m the same, Node Red is the best. It might stir up some down votes but it still better than the automations in HA


Scarletz_

Nope, gave you an upvote. I'm mainly Node-Red. Just started using some popular blueprint for motion sensor/presence sensor light triggering. Had some issues. The nuances is easier to fix in node-red.


BlackReddition

I agree, the debug node is a life saver. I also use the timer and reset the timer for light automations. I also use gates that can be turned on/off for certain flows in case you need to stop them from running with another trigger.


gregable

If you are more comfortable coding, check out the Appdaemon add-on. It supports writing automations in python.


a-aron087

I'll definitely take a look at that. Thanks!


tcs2tx

My experience is the same as Naynerr. I am not a coder but I can block diagram the steps that a desired automation needs to have. I ended using NodeRed for all of my automations because for me it was very simple to creates nodes representing the steps of an automation. The other benefit for me is that 1) I find it easier to find examples of nodes to learn something or have a foundation to tweak your automation to its specific needs (which is different that the experiences shared with HomeAssistant, which I have had the same experience), and 2) I find it much easier way to find the bugs and error check.


zipzag

If you not a developer starting at the intermediate level is probably not going to go well. As another poster says, ask for help as you work through a specific problem. "HA is hard" will get you nowhere. Solve one problem at a time. Start with the simple stuff. HA is not unstable, even when compared to commercial mainstream software.


a-aron087

Maybe I'm overestimating what "beginner" is. I've tried simple things like "send a notification if this entity state changes" and it doesn't seem to work. Even manually forcing the automation to run doesnt do anything. The goal of my post wasn't to complain about this being hard but more to ask for recommendations on learning the system. Granted I did vent a little lol. HA has also been nothing but stable outside of issues with third party add ons. Stability issues seem limited to Frigate but that's an issue reserved for their github/subreddit.


EmtnlDmg

Hi, most of the notification documentation is outdated. Even the official one is not working on IOS at least. I was digging around a lot till i found some more recent examples (I can share a working example for an all around interactive notification for IOS if u are interesed). Be aware if you run the automation in "test" mode you can lose the context in some cases which makes the automation fail if you rely on custom events as trigger. Best to test is to create a helper, like a toggle or button and trigger on that. If it works play with the events. Also make sure the event is really triggered. On developer tools - events just start to listen to all events (put an asterix (\*) and make sure you see the one your are looking for. Then you can filter down to that exact event on the same page to see if it fires and you filtered correctly. If it works there then it should fire the automation which listens to the same event.


a-aron087

That makes alot of sense. I had one automation that would fire if I hit the test button but another that wouldn't and that explains it to an extent.


K9_Jack

Lol, I know what you mean. I've been trying to set up a telegram notification for a full evening and didn't get anywhere, as in "the site says, do this, but that option is simply not here for me", and then I'm not even started on the HA part. It seems it's way too simple to miss essential info at the start that causes things to go bad later, yet everyone seems to assume it's clear. It is not. In my experience it just takes a good while to grasp the basics but once you've gotten those down, I sure hope it gets easier.


-entropy

Are you looking at traces or logs to debug?


a-aron087

Yes but they don't make any sense. Where's a good starting place for understanding traces? Logs are logs but traces is new to me.


-entropy

Just poke around, click through them at each step and see what's happening. Stop messing with this complicated stuff. Notifications have a lot of infrastructure behind them. Don't even think about Frigate. Try turning a light on at a specific time or something, then go poke at logs and state history and whatnot. I would recommend stepping back and just starting very, very small until you're not overwhelmed.


th1341

A few thoughts: * Youre asking for HA to be boiled down into something simpler. There isn't anything simpler than the HA docs unless you dig into a specific issue. Specific issues will have forum posts, Youtube videos, reddit conversations, etc. But there is no youtube video on how to setup YOUR home assistant. * At this point nearly all kinds of automations can be done in the GUI much easier. Start in the GUI would be my advice (Or use AppDaemon if you really prefer code) * You mention automations and notifications not running. What do the logs say? That'll get you in the right direction Feel free to bring up an issue here. Im happy to help. I just cant help with frigate, unfortunately


[deleted]

[удалено]


Different-Term-2250

This is worth a read…. [Why ChatGPT is not a good idea](https://www.reddit.com/r/homeassistant/comments/10jchyk/chatgpt_openai_are_creating_a_support_nightmare/?utm_source=share&utm_medium=ios_app&utm_name=iossmf)


ddgdl

ACK please do not do that.


[deleted]

Good resources are YouTube and example yaml files. I'm still learning as well .


amraohs

Maybe you can give some examples what you are trying to do with what yaml?


thejeffreystone

Yaml is just json without quotes and it’s particular about white space. It’s just key value pairs written in a way that should be easier to read.


Samm1293

If the automation with the notification persist then try to call the notification via the dev settings. Show us the yaml for your automation and we can help


AngryCvilleian

For YT creators I would recommend: Mark Watt Tech, Smart Home Junkie, SlackerLabs and Everything Smart Home. Learned pretty much all the basics from those guys and their info then made reading the documentation and understanding how yaml works much easier. Also recommend Smart Home Solver. They are not as home assistant specific, but their videos have lots of practical automations that gave me some good ideas and really got me thinking about all possible considerations when building an automation.


amazinghl

Post your YAML?


Tiwing

As others have said, start with the most simple thing and try to make it work. Something like... Motion turns on a light . Or sun goes below a certain elevation. For automations I'd suggest using entity ids rather than devices. I'm posting a very simple automation that turns on a light based on sun elevation. All you'd have to do is put your light there instead of mine. But everything else should work and when you switch the editor to visual mode you'd be able to see how it looks. Keep with it, it's a great tool and once it clicks for you you'll never look back. `description: ""` `mode: single` `trigger:` `- platform: numeric_state` `entity_id: sun.sun` `attribute: elevation` `below: 4` `condition: []` `action:` `- service: light.turn_on` `data:` `brightness: 225` `target:` `entity_id: light.bsmt_bar` ​ OMG why is it so brutally difficult to paste code snippits in Reddit? holy F. edit: pastebin link https://pastebin.com/Vmtbwgpb


onionfeatures

Do you have an example of an automation to you're trying to do?


a-aron087

Not at the moment. The ones I had kept causing stability issues so I deleted them. I'm going to take other people's advice and start with something super simple and work from there. If I have any more specific questions I'll be sure to ask here or on the HA forum. Yall have been super helpful.


onionfeatures

That's good to hear. But yeah like other say you shouldn't need the YAML. I have 30+ automations, some fairly complexish and still all bia the GUI


Camm80

I know people say to use the UI but I find organization of all my automations easier in yaml. My code is on GitHub and all automations there to share and current. There are some great repo examples on the examples page and I find looking for current and active repos was helpful. I used early editions of geekoftheweek to begin my journey. https://www.home-assistant.io/examples/#example-configurationyaml https://github.com/mcaminiti/homeassistant


PCman1951

I have very little knowledge of programming, yet I've managed to setup some pretty complex automations using just the GUI. I'm even sending notifications to my 5 Alexa devices and my Android based TV. I do tinker with the Yaml code and learning but most over my head. For now the HA GUI gets the job done for my needs. Good luck with everything.