config-editor-card/README.md

86 lines
2.1 KiB
Markdown
Raw Normal View History

2021-12-01 03:00:20 +01:00
Config Editor Card to edit configuration.yaml from dashboard
2021-12-01 15:31:08 +01:00
Automaticly searches for `*.yaml` in the root and subfolders and lists in the dropdown menu.
2024-04-05 22:50:50 +02:00
![screenshot](https://github.com/junkfix/config-editor-card/raw/main/screenshot.png)
2021-12-01 15:31:08 +01:00
2021-12-05 15:59:38 +01:00
2021-12-01 15:31:08 +01:00
2021-12-01 03:00:20 +01:00
## Installation
2021-12-01 15:31:08 +01:00
### Step 1
2024-04-05 22:50:50 +02:00
You will **also** need to install a custom component https://github.com/junkfix/config-editor to reads/writes files
2021-12-01 15:31:08 +01:00
2021-12-01 15:46:17 +01:00
* **[HACS](https://hacs.xyz/)**
Integration > `Config Editor`
2021-12-30 04:22:46 +01:00
* **Manual**
Download and copy `config_editor` directory in `custom_components`
2021-12-01 15:46:17 +01:00
Restart home assistant.
2025-03-17 18:40:04 +01:00
Do one of the following:
2025-03-30 17:05:08 +02:00
* Settings > Devices > Integrations > + Add Integration > Config Editor
2025-03-17 18:40:04 +01:00
* Edit configuration.yaml and add the following so it can load
```
config_editor:
```
2021-12-01 15:46:17 +01:00
Restart home assistant.
2021-12-01 15:31:08 +01:00
### Step 2
2021-12-30 04:22:46 +01:00
* **[HACS](https://hacs.xyz/)**
Frontend > `Config Editor Card`
2021-12-01 15:46:17 +01:00
* **Manual**
2022-10-18 17:49:35 +02:00
Enable "Advanced Mode" from your user profile page
2021-12-01 15:46:17 +01:00
add config-editor-card.js to your `<config>/www/` folder
2025-04-04 13:01:37 +02:00
Settings > Dashboards > ⋮ > Resources > + Add Resource > Javascript module > url `/local/config-editor-card.js?v=1`
2021-12-01 15:46:17 +01:00
2021-12-01 03:00:20 +01:00
2021-12-30 04:04:15 +01:00
## Add in the sidebar
2021-12-01 03:00:20 +01:00
2025-04-04 13:01:37 +02:00
Settings > Dashboards > + Add dashboard
2021-12-30 04:04:15 +01:00
2024-04-05 22:50:50 +02:00
create a new tab in panel mode and add the card [more info](https://github.com/junkfix/config-editor-card/issues/29)
2021-12-01 15:46:17 +01:00
```yaml
2021-12-01 03:06:23 +01:00
type: custom:config-editor-card
```
2021-12-01 03:00:20 +01:00
2021-12-30 04:22:46 +01:00
2021-12-01 03:00:20 +01:00
It is also possible to add this using `+ Add Card` UI and choose `Custom: Config Editor Card`
2021-12-30 04:22:46 +01:00
#### To create a new file
2022-03-05 21:47:19 +01:00
choose the first blank in dropdown menu and type some text and hit Save or ctrl+s
2021-12-30 04:22:46 +01:00
2022-02-27 04:54:53 +01:00
#### Advanced Config
| Name | Default | Description
| ---- | ------- | -----------
| file | | autoload file eg. `home-assistant.log`
| readonly | `false` | read only
| hidefooter | `false` |
| basic | `false` | Force basic editor
2022-03-03 21:43:00 +01:00
| size | `100` | font size
2022-03-12 02:20:37 +01:00
| depth | `2` | subfolder depth 0 or more
2021-12-30 04:22:46 +01:00
Please backup your files before using as there is no undo.
2024-03-07 14:46:43 +01:00
---
2024-03-08 23:09:38 +01:00
<a href="https://www.buymeacoffee.com/htmltiger" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png" alt="Buy Me A Coffee"></a>