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.
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’
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.
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.
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”?
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…
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.
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.
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.
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?
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.