HomeAssistant-DashboardPlus

I’ve created a simple Python script to open your Dashboard in a windowless borderless box on your Microsoft Windows desktop.

You can choose if it is always on top.
You can set the size.
You can change if it is resizable or not.
You can set the dash to auto-reload at a given interval.
You can set the exact coordinates of your dashboard so that it always opens in the same location.

This allows you to make your dashboard look more like a windows background but fully functional. I set up my instance to fill the entire desktop with my dashboard but not to cover the task bar. That way my dash is always running in the background of what I am doing.

You can find the script here: GitHub - codemonkey2k5/HomeAssistant-DesktopPlus: A simple python script that will allow you to open HomeAssistant in windows to a fixed location on your desktop.

1 Like

Does this only work on Windows machine? I get the following error on my mac:

Traceback (most recent call last):
File “/Users/johndeluca/Downloads/HomeAssistant-DesktopPlus-main/HAD-PLus.py”, line 1, in
import webview
ModuleNotFoundError: No module named ‘webview’

I think so, although I bet there is a similar method for Mac. I just don’t have anything other than a windows machine to test on.

You might try giving the current script to ChatGPT or Grok and ask if it can build you the same thing for your OS.

Hello,

As the error reports you don’t have the webview module.
Line 1 of the py file:

import webview

As per module docs you should install using

pip install pywebview

Open a command prompt or a powershell as Administrator in Windows OS and install it running the above command.
In MAC run the command in terminal.
Remember you have to change your HA address in line 4 of the script.

@Ibgeek works on Win10 python 3.13 as it is as well.

Hope it helps :slight_smile:

2 Likes

Just installed Python, but when trying to run the pip install command i get this:

image

Where am i wrong?

Close your terminal window/command prompt after installing python then reopen it. Other than that it looks like your command is correct. Pip is a Python command so if after you do the above, it still doesn’t work, then you need to check to make sure Python installed correctly.

Thank you!

Ciao Maurizio,

Ensure pip is installed:

pip --version

You should get some version output.

Install pip using:

python -m ensurepip --upgrade

Do what @Ibgeek suggested.
Remember to run the terminal, command prompt as administrator on Windows.

1 Like

Updated version available that adds auto-refresh at a set interval. And a bit more. Use the same link above.

There is no /dashboard… folder in my Home Assistant. What do you recommend?

1 Like

Use the same URL that you would use to open your dashboard in any browser.

Thanks for the script. I have followed the instructions and installed python and re-booted (just in case) but when I click on the shortcut, I get a window with an error message “404: not found”?

1 Like

Thanks again. Actually, I edited the script to point it in the direction of my Home Assistant and it worked. I also found that I can run more than one instance of HA on my PC, which I think may come in handy at some point… :grinning:

Many thanks, you are a superstar!

1 Like

Hey there, it sounds like the script is running, but not going to the correct URL. The first thing I would do is past the url you used in any browser and make sure it is correct. I’d be willing to bet there is an error.

If you want, you can post your version of the script and I’ll look at it. Of course the URL won’t work for me but I might see something that can be corrected.

Exellent! Glad everything is working for you.

I agree, having multiple instances is going to be very helpful.
You can use any URL you want in this script so it can be used for much more than just for Home Assistant. :wink:

1 Like

wow! I never thought of that! Just a quick question on re-sizing - how do you do that, because I can’t drag it using my mouse

1 Like

The bits of the script you need to edit look like this:

x=-1, y=-1, width=2583, height=1449,
frameless=True, resizable=False, on_top=False

If you want to be able to resize at any time, make “resizable=True”.
If you just want to resize it and keep that size locked, you use the width and height numbers. Those numbers are pixels. The x= and Y= represent the X and Y coordinates of the top left corner of the window that you are opening.

I hope that helps.

It’s finally working here. The instructions are too specific to your installation of Windows. For example: “Next right click on it, and select “Show More Options”” doesn’t exist in my Win11. “then select “Send to Desktop (Shortcut)”.”, again is not in my Win11 context menu.

"This will give you a shortcut that will open your homeassistant. " - again a shortcut to the Python script doesn’t open the script here. I could only run it from the terminal.

It looks useful. For example, I have a PC that keeps a browser window open on my porch camera. So, how is this Python script different from just opening a page in a browser?

1 Like

If you do not see the “Show More Options” option in your right click menu, you’ve done something to remove it. There are way to bring the pre-windows 11 right click back.

I assure you that unless otherwise altered, Windows 11 does have such an option. Much to the chagrin of many.

If your shortcut doesn’t work, then there is a problem with the shortcut. Also make sure your scripts extension is .pyw (this was updated today in my GitHub page) It eliminates opening a terminal window in the background.

If you didn’t read the README file on my GitHub page, please do so.

The difference is that you can open a page, borderless, locked size and at specific coordinates on your screen. You can make the screen always on top, or not.

So in my example, I have my dashboard open 24/7 with a fixed size and screen location so that it covers my entire desktop, but not the taskbar. I use this machine all day but can easily minimize my active window and see my dashboard. No accidently closing it or moving it. You can open multiple instances to open multiple web pages and fix their locations on the screen. It also can auto refresh.

Hi Tony, is it possible to be re-sizeable and frameless? I can’t re-size if Frameless is True.