Five Best Practices in Home Assistant - Use this now!
Тәжірибелік нұсқаулар және стиль
These 5 best practices are things that you should follow when working with Home Assistant. Over the years I found that these are really helpful and I think they will help you too.
⭐Links used in this video:⭐
* How to install Google Drive Backup: • The MOST IMPORTANT ADD...
* How to install MariaDB: • No More History Loss I...
* How to use Trigger IDs in Home Assistant: • How to use Trigger IDs...
⭐ Read the blog version of this video on www.smarthomejunkie.net ⭐
⭐⭐⭐
* Join this channel to get access to perks: 📺 / smarthomejunkie
* Please consider becoming my patron 🏅 at / smarthomejunkie
* Or please support me by buying me a ☕ at ko-fi.com/smarthomejunkie/
⭐⭐⭐
My Devices: github.com/smarthomejunkie/My...
Instagram: / smarthomejunkie
Twitter: / smarth0mejunkie
Facebook: / smarthomejunkie
TikTok: / smarthomejunkie
Discord: / discord
If you got enthusiastic about Home Assistant, you can watch many more videos in this playlist: • Home Assistant
Check my channel for more awesome Smart Home tutorials: / smarthomejunkie
00:00 Introduction
01:08 Best practice 1: Backup
01:54 Best practice 2: Use MariaDB
02:27 Best practice 3: Include entities in the recorder
04:02 Best practice 4: Naming Conventions
05:45 Best Practice 5: Trigger IDs
#homeassistant #homeautomation #bestpractice #bestpractices
Пікірлер: 63
These are my 5 best practices! Tell me your best practices in the comments. I am really curious about that!
I totally missed the one in Trigger ID's, this will clean up my automations section immensely. Thanks for abyohet great video!
my best practice is to watch all the videos from this channel. In my opinion, this is the best channel for HA configuration questions. Thank you very much.
@SmartHomeJunkie
2 жыл бұрын
Oh wow... You make me blush ☺️
Another great video. I have implemented three best practices immediately and will do so with the rest soon. I really appreciate the brevity of your videos - no unnecessary stories, no self-congratulation, no sideswipes at others - just great. Thank you.
@SmartHomeJunkie
2 жыл бұрын
Thank you for these great compliments. 👍🏻👌🏻
I’m all about naming conventions in my professional career so to see you mention that made me excited lol. Great ideas!
Oh dammit. Now I have to remake my automations for trigger IDs. Lol. But something I knew right away. Automation naming convention is crucial. I use something like... Light: front door toggle state auto Timer: front door enable timer from motion Timer: front door cancel timer if turned off It's a work in progress. But it's something like "device type actioned on" : "device name" "action" "trigger" This way I can find automations quickly
@SmartHomeJunkie
10 ай бұрын
Great idea!
Great video, thanks! Here's one of my best practices: When you're installing an update (once you've read about and prepared for the breaking changes), always do this during daylight hours. Lights are likely to be big part of your smart home. If they stop working other household members will get upset fast.
@SmartHomeJunkie
2 жыл бұрын
Definately a good one 👍🏻
@ricardoramirez-ue5li
Жыл бұрын
Indeed, it's stuff for nightmares, lol, "Breaking Home Assistant in the middle of the night"
Great video! Many thanks ..
Thanks for this video it was really helpful
Thanks for sharing.
Great video! I'd like to see more about security.
Great video thanks, love to hear about more practices that help.
Another helpful video! Thanks and keep them coming😉
@SmartHomeJunkie
2 жыл бұрын
I'm glad you think so!
Great video 👏👏👏 Great channel 👍🏻 👍🏻 👍🏻
My extra best practice is to have an admin-only dashboard containing the vitals of the host which is running the HA and monitoring it - CPU speed, usage, RAM speed, usage, and I have installed a temp and humidity sensor in the location where the device is physically located. I am using an Intel NUC with HA OS.
@SmartHomeJunkie
Жыл бұрын
Great idea!
one more great tutorial. thanks
Great video. I like number 5. I am definitely going to change my automations to work like that where applicable. I follow a similar naming convention except i use the room location first and the domain.
Once again an excellent video. I like 4 and 5 since they are essential to start using early. The naming convention which considers groups is truly excellent. Instead of trigger ID, I check the state as part of the choice. I think this is easier when combining various sensors or conditions. As a bonus best practice: Using helpers or template sensors can help a lot to simplify detecting complex events reacting to those events. Instead of making an automation to turn off the lights when nobody is home, create a template sensor to detect that nobody is home and an automation to turn off the lights when the sensor is triggered. This way, adding a guest mode is much easier. I'm pretty sure I got all of this from this channel as well.
@SmartHomeJunkie
2 жыл бұрын
Thx. And thx for your best practices. You might be right 😉 I love to create my own sensors as well.
Thanks again for that great video. I wish I had watched all of them before I startet with home assistant. I also love your best practices. As I develop software for a living I already implemented naming conventions and backups. But your tipp with maria db I will follow immediately since I had two severe db crashes in the last years. Thanks for the other tipps too. I really love your videos as they really stand out compared to the many videos around where people explain trival things like rocket science. They are extremely helpful.
@SmartHomeJunkie
Жыл бұрын
Thank you for your compliments!
Good boy 👏👏👏 great job👏👏👏
First time I actually understood the use of Trigger IDs. I've been doing this with Wait Templates but I could never get them right using the UI - I could only set them up in YAML. Now I finally understand how they work! And BTW, I'm no noob; I've been using HA since the zero point days. Well done and thanks!
@SmartHomeJunkie
2 жыл бұрын
Yeah! They're really powerful to use!
Thanks very much for your hard work. I really enjoy your videos. On Tip #4, would you mind extending it a bit (eg how you name your other sensors, eg motion, temperature and even your Areas/Rooms? I think what you mentioned there is an excellent idea specially as your device database gets bigger... Thanks a lot
I really think about to start from scratch on a new hardware and follow these five best practices
@SmartHomeJunkie
11 ай бұрын
Great idea!
Thanks Ed, I use all the 5 in my system, and some other tricks but most what I Learned from you I used in my system, I have a request to open discord server to interact , if that possible of course 👌🏻
@SmartHomeJunkie
2 жыл бұрын
I do have a Discord server. It's in the description of my channel. I also have a members channel on Discord exclusively for members that joined this KZread channel so that members can live chat with me.
This is great thankyou. Any tips on making our interface better? Using mushroom?
@SmartHomeJunkie
2 жыл бұрын
Yeah, mushroom is great. It's my go to way to create dashboards nowadays.
Thanks Ed, Another great video. I probably need an even more beginners level top 5 so I am wondering what would 6-10 be like. So feedback is more please! A question is do you know of any other backup integrations besides Google? I think the database stuff and the writes to it was super helpful but maybe that could be a video. I am speaking first to eliminating extra writes as I am sure it is probably happening now. I enjoyed and liked the custom sensors and other videos you make and I know I could be doing this smarter. I am absolutely that guy you were in the beginning. Maybe worse as I am still working on taking devices off SmartThings and HUE. So I have devices I probably didn’t remove from the SmartThings integration and then added in ZHA Maybe I should do the Mariadb and start over as I see someone asked!
@SmartHomeJunkie
2 жыл бұрын
Thanks! If you add the include line to the recorder settings in the configuration.yaml, then HA will only start logging anything that is below the include line. Is really encourage you to do so. But... There are some functionalities that need their entities to be within the include section otherwise they won't work. For instance, the energy integration in HA will only work of the history of some entities is being saved. I can communicate which entities these are later if you want. Currently I am not beat a computer and it's hard to copy them on my phone.
@yngveskog4935
2 жыл бұрын
@@SmartHomeJunkie This is a problem for me with the include/exclude function, simply knowing what are the entities that is nice to have, what do you absolutely not need and what entities are crucial for other things to happen. So a video about the energy integration is nice!
Hi, Thank you for nice video and clear instructions about how to store history data in MariaDB. You also published a video on InfluxDB. Does this mean you use both databases at the same time? If so, where do you have the data stored as this might be heavy-lifting for a Raspberry Pi. Thanks
@SmartHomeJunkie
8 ай бұрын
I used Influxdb for long term statistics, but I do not use it anymore. I didn't have issues using both at the same time.
@mlvdende
8 ай бұрын
@@SmartHomeJunkie thanks. what are you currently using for long term statistics? (btw would be great topic to get a better view on how to best organize the data in HA)
@SmartHomeJunkie
8 ай бұрын
@@mlvdende I used Grafana together with Influxdb. Nowadays long term statistics are also stored in my Mariadb. But, the HA native database has gotten some updates, so that should work too.
Thanks for the great video! I'm pretty new at this and I'm curious about something. If I were to adopt a naming convention such as yours for all my entities and rename all the entities I already have, will that break the automations I've already set up? Or will they update with the new entity names?
@SmartHomeJunkie
Жыл бұрын
If you change an entity ID, you have to change this in your automations manually too.
@lukeama82
Жыл бұрын
@@SmartHomeJunkie Great! Thanks for clearing that up.
Hey Ed, what naming convention would you use to identify door & window sensors? alarm.sensor_ bedroom_window_1 ~or~ window.sensor_bedroom_window_1 ~or~ Something else?
@SmartHomeJunkie
8 ай бұрын
I use binary_sensor.garden_door_left
Thanks Ed, can you migrate your existing db to Maria or would you have to start again? Thanks
@SmartHomeJunkie
2 жыл бұрын
Hi Dam0, I believe you have to start again unfortunately.
@emms-place
2 жыл бұрын
@@SmartHomeJunkie thats right. You will loose all your history. But i think it is a small price to pay for stability and performance
Just a question regarding naming conventions, what about something from an integration? Lets say WLED?
@SmartHomeJunkie
10 ай бұрын
I consider that a light
There have been significant improvements with the HA database. Do you think even with these changes mariadb is still better?
@SmartHomeJunkie
2 жыл бұрын
I know that these improvements also have effect on MariaDB. It's a different way of storing things. The default dB is one file and if that gets corrupted, you have to delete it and build it up again.
@marc3793
Жыл бұрын
Great video. I feel it's worth mentioning that I have used MariaDB for a few years now and I have had a couple of DB corruptions even using that. (One a few days ago. I use an nVME drive so not due to SD card wear) So... definitely follow his tip number 1 too :-)
Hi smart home junkie.. Is there a easy or less painfull way from moving from ZHA to MQTT?
@SmartHomeJunkie
2 жыл бұрын
Hi Darren, Not that I know of... If you have two zigbee sticks then you might be able to move to Z2M gradually otherwise you have to do it in one go I'm afraid. This is what held me back for a long time to move from deCONZ to Z2M.
@CrazyAngelfire
2 жыл бұрын
@@SmartHomeJunkie ok tbh I have got 2 sonoff zigbee 3.0 sticks. One is running zha on a SSD and the other is MQTT on a SD card. So might have to get another SSD and move slowly
@SmartHomeJunkie
2 жыл бұрын
@@CrazyAngelfire Sounds like a plan 👍🏻
Can you change the name of your ID picture mine is like 20 characters long.