Community Hass.io Add-on: Lovelace Migration

This add-on is provided by the Community Hass.io Add-ons project.

GitHub Release GitLab CI Project Stage Project Maintenance

Supports armhf Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

This add-on automatically converts your existing UI to the new Lovelace UI.

About


The new Lovelace UI for Home Assistant is here, and it is extremely fast, extremely customizable and extremely extensible.

Building the Lovelace UI configuration from scratch can be a bit of a daunting task, so this add-on helps create a starting point to work from. In most cases you will only need to run this add-on once, but if ever you do you need to run it again, backups of your existing ui-lovelace.yaml file are automatically created and maintained.

Click here to read more about Lovelace UI

Installation


The installation of this add-on is pretty straightforward and not different in
comparison to installing any other Hass.io add-on.

  1. Add our Hass.io add-ons repository to your Hass.io instance.
    Add the following URL: https://github.com/hassio-addons/repository
  2. Install the “Lovelace Migration” add-on
  3. Start the “Lovelace Migration” add-on
  4. Check the logs of the “Lovelace Migration” to see if everything went well.
  5. Navigate to http://your.domain.com:8123/lovelace to see the new UI.

Support


You can always get support here at the Home Assistant community forums, join
the conversation!

You have several options to get them answered:

You could also open an issue on GitHub, in case you ran into a bug, or maybe you have an idea on improving the addon:

We will do our best to help you out!

Repository on GitHub


Looking for more add-ons?


The primary goal of our add-ons project is to provide you (as an Hassio / Home Assistant user) with additional, high quality, add-ons that allow you to take your automated home to the next level.

Check out some of our other add-ons in our Community Hass.io Add-ons project.

8 Likes

(reserved for future use)

1 Like

:tada: Release v0.1.1

Full Changelog

Fixed

  • Fixes automatic backup
1 Like

having issues with this

File “/root/lovelace_migrate.py”, line 277, in from_group_config
card = Lovelace.Card.from_config(entity)
File “/root/lovelace_migrate.py”, line 234, in from_config
return cls.from_config(config)
File “/root/lovelace_migrate.py”, line 229, in from_config
return super().from_config(config)
File “/root/lovelace_migrate.py”, line 129, in from_config
return fx(config)
[cmd] /usr/bin/run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

Hi there,

Perfect !
Works like a charm for me !
Switched to lovelace <3

hi there, similar situation over.
tried already do uninstall and reinstall nothing helps.

indent preformatted text by 4 spaces

INFO: Output file is set to: /config/ui-lovelace.yaml
Traceback (most recent call last):
File “/root/lovelace_migrate.py”, line 844, in
sys.exit(main())
File “/root/lovelace_migrate.py”, line 779, in main
states_json = hass.get_states()
File “/root/lovelace_migrate.py”, line 711, in get_states
request = self.get(’/states’, **kwargs)
File “/root/lovelace_migrate.py”, line 699, in get
request.raise_for_status()
File “/usr/lib/python3.6/site-packages/requests/models.py”, line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: http://hassio/homeassistant/api/states
[cmd] /usr/bin/run.sh exited 1
[cont-finish.d] executing container finish scripts…
[cont-finish.d] 99-message.sh: executing…

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.Preformatted text

I’m having issues with Lovelace as well. Tried a bunch of times with the same results=insanity;) and hoping someone can find an obvious mistake I can’t see here: Log


            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

Also disconnecting from internet at times and reconnectingLogin attempt or request with invalid authentication from 172.30.32.2
And yet the Configuration validation says- Configuration valid!
I’ve reset rebooted and added lovelace ate url end and this is the result
:Could not find ui-lovelace.yaml in your config dir.
RELOAD LOVELACE-UI.YAML

The add-on seems indeed broken, but there is an easy workaround.

Just copy the lovelace_migrate.py file from https://github.com/dale3h/python-lovelace to your config folder and follow the instructions on that site to get it running.
SSH to your hassio and run
sudo apt-get install python3-pip
pip3 install "requests>=2.14.2" "pyyaml>=3.11,<4"

Afterwards it’s just running the script.
Just be sure to use the -p https://your.domain.com/api to get it running.

Works like a charm. :wink:

not on hassos. it doesnt :smiley:

So, what’s not working…? I just tested it again and it works fine…

  1. Install the SSH & Web Terminal addon

  2. Connect over SSH to your HassIO instance by using the new addon.

  3. Just follow the instructions…

    sudo apt-get install python3-pip
    pip3 install “requests>=2.14.2” “pyyaml>=3.11,<4”
    python3 lovelace_migrate.py -p https://your.domain.com/api

If you use https/ssl, make sure you use here the “your.domain.com” that matches your certificates.

29%20am

I thought the whole point to hassio was its locked down so you cant use apt-get etc

Try without sudo…
If that doesnt work, try with skipping the whole first command.

I believe the command for running on community SSH add-on is apk add python3-pip

I am currently mobile and unable to test. I will work on finding what is causing the issue in the add-on and fix it.

1 Like

im getting into the realms of I have no idea what I am doing - wish I understood dockers and how it all pieces together.19%20am

Hello Guys, I have problem with run this add ons.

:frowning: No work on my Hassio (raspberry)

**This is the LOG: **

Please Helpme.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-run: applying... 
[fix-attrs.d] 10-run: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Lovelace Migration v0.1.1
 Automatically convert your existing UI to the new Lovelace UI
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-auto-backup.sh: executing... 
[cont-init.d] 10-auto-backup.sh: exited 0.
[cont-init.d] 11-cleanup-old.sh: executing... 
[cont-init.d] 11-cleanup-old.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Output file is set to: /config/ui-lovelace.yaml
Traceback (most recent call last):
  File "/root/lovelace_migrate.py", line 844, in <module>
    sys.exit(main())
  File "/root/lovelace_migrate.py", line 779, in main
    states_json = hass.get_states()
  File "/root/lovelace_migrate.py", line 711, in get_states
    request = self.get('/states', **kwargs)
  File "/root/lovelace_migrate.py", line 699, in get
    request.raise_for_status()
  File "/usr/lib/python3.6/site-packages/requests/models.py", line 939, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://hassio/homeassistant/api/states
[cmd] /usr/bin/run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

Exactly.

I actually thought the whole point of the ADDON is that you start it and it generates the YAML file… Why are you trying to run command line commands at all?

I did originally use Dale’s script before the addon came out but I ran it on a different RPi, not my Hassio one…

For the moment the add-on does not seem to work anymore in HassIO, so that’s why I was trying to give a workaround that worked for me.
Problem is that it is also already a couple of weeks ago, so I don’t fully remember how I did it.

I think the python3-pip is already installed, since hass needs it sometimes also.

So @Dominic, can you please try again without the first command. So just run:
pip3 install “requests>=2.14.2” “pyyaml>=3.11,<4”
python3 lovelace_migrate.py -p https://your.domain.com/api

worked - I had some issues with some groups causing some errors - maximum recursion depth but its all working now

Nice, glad I could help!