Skip to content

Instantly share code, notes, and snippets.

entity: sensor.adensville_charging_status
icon: 'mdi:car'
show_state: false
spin: false
state:
- color: yellow
spin: true
value: charging
- color: green
value: plugged
@OttoWinter
OttoWinter / 0migrator.md
Last active May 19, 2019 04:21
Lovelace Migration Script

Home Assistant Lovelace Migrator

Do you want to try out this experimental (!) new lovelace UI stuff in Home Assistant but don't want to migrate your entire configuration? This script is here to help! It reads in your Home Assistant configuration (specifically the group: section) and creates a matching ui-lovelace.yaml file in your Home Assistant configuration folder (of course backing up any previous file at that path).

To use this script, you first need to have python and home assistant installed where you plan to run this script. Do so using virtual environments and the pip3 install -U homeassistant command. Then copy below file to lovelace_migrate.py (any location should work) and run:

python3 lovelace_migrate.py -c <PATH_TO_HASS_CONFIG_DIR>