These 5 best practices are things that you should follow when working with Home Assistant. Over the years I found that these five best practices are really helpful and I think they will help you too.
โญโญโญ NOTE: โญโญโญ
This article accompanies a YouTube video. I wrote it for people who would rather read than watch a video. To keep doing this, I want to ask you to check out the video, leave a comment under the video, give the video a thumbs up, and subscribe to my YouTube channel. This means that the video is offered more often to new visitors so that they also stay informed of the latest Home Assistant tutorials.
Thank you for your support!
Ed
Best Practice 1: Google Drive Backup
Google Drive Backup is really handy to create backups that are stored in the cloud. I created another video about how to set it up and you can watch it here.
Best practice 2: Use MariaDb
The default database of Home Assistant is prone to failure If you use MariaDb, you won’t lose your history again. You can watch this video to see how you can install MariaDB yourself.
Best practice 3: Include entities in the recorder
The recorder in Home Assistant stores the history of all the entities in Home Assistant by default. This means that your database will grow rapidly and that your SD card might wear out very fast. By including only those entities that you really want to keep the history for, you will make sure that your SD card will last a lot longer and that your database will not grow that big. Watch the video of this tutorial to see how you can set this up.
Best practice 4: Naming Conventions
When you add new devices to Home Assistant, these devices and their entities will get random names. If you use a naming convention for your entities, you will make sure that you will find back your entities in your system very easily when you create automations and custom template sensors.
The convention that I use is domain.room_location_number
_number is optional in case you only have one device of the same domain in your room.
Best practice 5: Trigger IDs
When you create automations, it’s wise to use trigger IDs. With Trigger IDs, you can add multiple triggers to one automation and create actions for each trigger within that same automation. Do you want to know how you can use Trigger IDs? This Home Assistant tutorial explains exactly how you can set up Trigger IDs.
I need your help!
You will be doing me a huge favor if you subscribe to my channel if you haven’t already. And, you will help me a lot if you also give this video a thumbs up and leave a comment. This way, YouTube will present this video to new people, making the channel grow! In the video description, you will also find information about how you can sponsor me so that I can continue to make these tutorials for you.
Thank you!