Today, I'm going to cover how to set up themes in Home Assistant. I'm also going
to show you how to set up home assistant to automatically switch to a dark theme
at night and last but not least I'm going to share with you 20 themes that
I made for home assistant all right guys let's get started with the video
all right so the first thing that we need to do is create a new file where
we're going to store all the themes and we're going to store the file in the
home assistant config folder I have Samba set up to access the home
assistant folders so I'm going to use the Atom text editor but if you setup
the Configurator add-on you can also use that as well
alright so open your text editor and in here enter the themes that you would
like to use I'm going to add two things that I made one is a regular theme with
a light background and the other one is a dark theme I will show you how to get
these themes later on. then we need to save the file inside the home assistant
config folder so going to network Hass.io config and name the file themes.yaml
Now that we have that done open the configuration.yaml file look for
the frontend component and below type themes: !include themes.yaml this
will read the new file and will give us the option to select the new themes in
home assistant save the file and then restart home assistant
after home assistant is back online go into configuration general scroll
down and we now have a new drop-down where we can select any of the new
themes the next thing that we need to do is create an automation that will set up
a specific theme every time we open or sign into home a system from any device
to do that open the automation.yaml file and enter the following to explain a
little bit on the alias we are setting up the name for the automation on the
trigger we are using the home assistant platform and we are set in the event to
start this means that the automation will trigger at the start of home assistant
under action we are using the service frontend.set_theme
this is the command that is going to set up the specific theme and last under
data we enter in the name for the theme that we want to be enabled save the file
and then restart home assistant to apply the changes
now every time you restart or open home a system from any device you will get
the same thing that you set up in the automation. now what if we want a dark
theme to be enabled at nighttime and then another theme to be enabled during
the daytime well we can do that using the sun component and another automation
that would use the if statement let me show you how to do that first open the
configuration.yaml file and make sure that you have the Sun component by
default it should be already there but it's still double check then go back to
the automation.yaml file and replace the previous automation with the
following besides using the homeless system platform we are going to use the
state platform twice with the entity sun.sun and we're going to set the
first one to above horizont and the second one to below horizontal under
action we are going to use the frontend.set_theme for the
service template then under the data template we are going to use the if
statement to specify what theme gets enabled at a specific state so pretty
much this is saying that if the Sun is above the horizont you will use the
light theme otherwise you will use a dark theme lastly save the file and
restart home assistant to apply the changes
now with this said home assistant would automatically switch between a light and
a dark theme every day without you having to do anything
awesome right alright guys as promised I have a total 20 themes that I have
available for home assistant that I want to share with you today you can find
them in the written guide that I made for this video at juanmtech.com you can
find a link in the description below like always guys thank you for watching if you
like this video give it a thumbs up don't forget to subscribe if you haven't
done so already and I will see you in the next video