Skip to content

Get and set Home Assistant YAML from the dashboard and other configs that don't have a direct editor.

Notifications You must be signed in to change notification settings

emoses/hassConfigEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Hass Config Editor

Overview

If you’ve ever need to make mass edits to your dashboard, you’ll find there’s no API in Home Assistant to do so. However, the config is there to be edited, you just have to get to it. This is a small Deno script that uses the HomeAssistant websocket API to get and set configs the same way that Lovelace does.

Running

Install Deno.

Create a long-lived API token for your Home Assistant user, and then create a .env file in the base directory like so:

HASS_TOKEN=<your token>

Download your lovelace dashboard as JSON.

deno run --allow-net --allow-read=.env,.env.defaults clients.ts get > dashboard.json

Edit it as you see fit, then upload it back:

deno run --allow-net --allow-read=.env,.env.defaults clients.ts set < dashboard.json

About

Get and set Home Assistant YAML from the dashboard and other configs that don't have a direct editor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published