Stream Deck With Home Assistant – Quick Tutorial

Here is how to set up your Stream Deck with Home Assistant to control your smart home entities using customized button tiles. The HA integration plugin is extremely easy to configure and use, and I’m going to quickly guide you through the entire process and show you what exactly you can do once you get it to work. Buckle up, and let’s begin.

How Can You Control Home Assistant From Your Stream Deck?

The Home Assistant Plugin in the Elgato Stream Deck Marketplace.
The Home Assistant Plugin available for download in the Elgato Stream Deck Marketplace.

Using this project by Christoph Giesche – the streamdeck-homeassistant plugin, you can assign different service triggers to your Stream Deck buttons, read and display the reported entity states and associated values, and much more.

Any scenes, automations and scripts that you have configured within Home Assistant can be triggered using the plugin. You can also freely modify and customize the looks of the default blocks within the extension.

This project is, as of now, still regularly updated and new features are being added fairly often, so if you have a Stream Deck on hand and you make use of a Home Assistant powered smart home setup, there is virtually no reason not to use it!

An Example Setup – How I Control My Office Lights & Read Sensor Data From the Stream Deck

My Stream Deck Home Assistant plugin integration setup example.
Here is an example of my Stream Deck Home Assistant plugin integration setup.

My simple setup involves three two-way switches for each light in my office, buttons for quickly setting my custom lighting scenes and reading out the reported sensor values from my temperature & humidity meter in the room.

The light switches and the sensor blocks are made using the default plugin assets, while the square buttons for the scenes make use of simple colored square images that I quickly prepared.

The clock you can see on the side is one of the default Stream Deck blocks, and the whole setup takes up one of my 3 custom Stream Deck pages. That’s really it.

Short and long press functionality example.
Upon a short press, this button activates the green lights scene, while upon a long press, it switches to the red lights scene.

With these simple switches I can control all of the lights in my room together and separately, as well as change the colors of the lights moving between my four custom scenes which are (from left to right): warm light, cold light, blackout (all lights off), green light and red light scenes.

Both the green and red light scenes are activated using one button, the green light scene being activated on short button press, and the red one after it’s been held down.

Now that you know what you can do with just a basic setup of the Home Assistant Stream Deck integration, let me show you how to quickly set it up.

How To Quickly Set Up The HA Stream Deck Integration Plugin

Here is the whole process, which should take you just about a few minutes total. In the later part of this short guide, I will also show you how to set up simple switches like mine with just a few clicks.

Step 1: Install the Home Assistant Stream Deck Plugin

Log in to the Elgato marketplace, and navigate to the page with the Home Assistant Plugin here. Make sure that the Stream Deck app is open on your computer, and click on the “Get” button to download and install the extension.

Now, search for the plugin using the right hand side search bar and drag an “Entity (generic)” block to one of the free tile spots on your Stream Deck. Once you’ve done that, now comes the time for the one-time setup and connecting the plugin with your Home Assistant server.

Step 2: Server URL & Access Token Setup

Once you have the integration up and running, you will have to connect it to your Home Assistant instance.

Inputting Your Home Assistant Server URL

You can do this by simply entering your Home Assistant server URL into the “Server URL” input box in the extension. This is the very same address you use to connect to your Home Assistant interface using your browser with one small change.

If you don’t use an SSL certificate to with local your Home Assistant instance (that will be the case for most of HA users), you need to begin the address with “ws://”, rather than “http://”.

If you have a public Home Assistant instance which uses an SSL certificate with Home Assistant, you will type “wss://” in the very same place instead.

In my case, as you can see in the example on the image above, the full address was “ws://homeassistant.local:8123/api/websocket”, as I didn’t change the default HA port after the initial server configuration.

Creating and Adding Your Long-Lived Access-Token

Creating a long-lived access token in the "Security" tab in the HA profile page.
Long-lived access tokens can be created in the “Security” tab in your Home Assistant profile page.

For the plugin to connect to Home Assistant you need one more thing – the long-lived access-token (with admin right), which you can get in the “Long-Lived Access Tokens” section located at the very bottom of your HA profile page. You can learn more about these here.

To create a long-lived access token, you need to navigate to your Home Assistant user profile page (by clicking your profile name in the bottom left of the main HA screen), and then click on the “Security” tab.

Next, scroll down, and click on the blue “Create Token” button. Then you’ll be prompted to copy the token value. After you copy it, simply paste it into the “Access-Token” field in the Home Assistant Stream Deck plugin, and you’re all done!

By default, your token will be valid for 10 years, and after that time passes, you’ll have to create another one.

After you’ve done that, you only need to press the “Connect” button, and your Home Assistant server should now be linked to the

Step 3: Create Your First Home Assistant Tile

Setting up the keypad appearance.
Setting up the keypad appearance.

In this example, we are going to be creating a tile that upon being pressed, will activate our “Office Lights Warm White” scene that I have already set up in Home Assistant.

Click on the “Domain” drop-down menu in the “Keyboard appearance” section, and select the domain of the entity you want to control using your tile.

This will only affect the tile’s looks and make it possible for it to change and update it based on entity states repo, whenever it’s needed. We will configure the interaction after the button press in the “Keypad actions” section in a short while.

There are a few additional options you can choose here:

  • Use custom title – you can check this box to change the default display title of the tile (make sure that the title field on top is clear for this to work).
  • Custom labels – aside from the title, you can set up to 4 lines of custom labels that will be visible on the tile. These might obscure the tile image.
  • Show visual service indicators – if this box is checked, the visual indicator of service availability will be displayed in the top right part of the button in the form of a small green circle.
  • Hide icon – the icon of your entity will be hidden.

Both the title and the labels can make use of nunjucks templates for handling dynamic content (such as the updated readouts of a sensor, or a state of a chosen entity).

After making your edits, remeber to always hit the “Save” button to save your changes and refresh the tile.

Set a Custom Image for Your Tile

Setting a custom image for the tile.
Setting a custom image for our tile.

As you might have noticed, I prepared a simple yellow square tile image in Photoshop before we began.

To import your own image to use on your tile, click the small down arrow in the top right corner of the tile preview, and select the “Set from File” option. There you can navigate top your custom tile image. If you don’t feel like you need to do that yet, you can use the default tile design.

Now, once we’ve got the looks of the tile sorted, let’s actually make the button do something when it’s pressed.

Step 4: Setup the Keypad Actions For The Tile

Configuring the keypad actions.
Configuring the keypad actions.

To make your button actually do something, you will have to configure a short press action, and, optionally, a long press one.

To do this, you simply need to select a domain to which the entity you want to control or display the state of belongs, and then selecting appropriate service actions from the drop-down menu.

In our case, the domain is “scene”, as we want to toggle our “Office Lights Warm White” scene. If we were trying to turn on a single light, our domain would be “light” and so on.

Selecting the service trigger type.

The service will be “Activate”, because we want the button to trigger the service every time it’s pressed.

Picking our desired entity from the list.
Picking our desired entity from the list.

Finally, the entity we will choose is the scene itself, which is, you guessed it: “Office Lights Warm White”.

If you don’t have any entities in this menu, you have either selected a wrong domain, or don’t have any existing entities to control in the domain you’ve selected.

The setup is exactly the same for long press actions.

Two More Examples for You – Light Switches & Sensor Readers

A Simple Light Switch

Setting up a simple two-way switch for my main office light.
Setting up a simple two-way switch for my main office light.

Another example of a neat one button two-way switch would be a simple light switch which toggles a chosen light entity on or off, and changes its looks depending on which state our light is in.

For this, we need to select the domain “light”, and our light entity, which in this case will be “Main Office Light”.

Now the only thing left to do is to create a custom label with our button name (I simply named it “Main” as you can see on the image above) and configure the button press action.

Configuring the button short press action to toggle the selected light entity.
Configuring the button short press action to toggle the selected light entity.

The action of our button will be configured in the same way as with the scene we made earlier. We select the domain “light”, service “toggle” and the entity “Main Office Light”.

That’s it. The setup process will be almost exactly the same for buttons controlling scripts, remotes, or any other entity types.

Temperature & Humidity Sensor Value Reader

Displaying Home Assistant sensor info on the Stream Deck.
Displaying Home Assistant sensor info on your Stream Deck is a matter of about 3 clicks total.

Our last example is the temperature & humidity sensor readout, which is probably the easiest tile you can setup using the extension.

If you have a similar sensor in your Home Assistant setup, select the domain “sensor”, and the friendly name for the sensor entity you wish to see on the button.

That’s all you have to do. The sensor readout, in our case the temperature will now be displayed on your newly made tile.

All Done – Now Time For Your Own Ideas

My simple Stream Deck Home Assistant setup.
The HA plugin for the Stream Deck is not only very simple to set up, but also extremely useful!

That’s it! Now you should be able to control any Home Assistant device, scene, automation or script from your Stream Deck. With this kinda setup, each and every entity present in your Home Assistant setup can be either displayed according to its state on one of the tiles of your Stream Deck, or be controlled by a short or long button press. Pretty neat, right?

This is one of the more useful Stream Deck plugins I’ve come across, and quite honestly the one I probably use the most when I’m in my office. I hope that this short guide was helpful to you and if it was, consider sharing it with your fellow Home Assistant geeks! Thanks for reading!

Tom Smigla
Tom Smiglahttps://techtactician.com/
Tom is the founder of TechTactician.com with years of experience as a professional hardware and software reviewer. Armed with a master’s degree in Cultural Studies / Cyberculture & Media, he created the "Consumer Usability Benchmark Methodology" to ensure all the content he produces is practical and real-world focused.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Check out also:

Latest Articles