From 592808d41b9357d43215268fa4801ce742f7d0f0 Mon Sep 17 00:00:00 2001 From: Trefor Southwell <48591903+springfall2008@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:43:53 +0100 Subject: [PATCH] Fix issue with auto-generated dashboard writing to bad directory (for older AppDaemon) (#348) * Move auto-generated dashboard to /config to avoid it breaking older AppDaemon installs --- apps/predbat/predbat.py | 2 +- docs/output-data.md | 2 +- example_dashboard.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/predbat/predbat.py b/apps/predbat/predbat.py index baebf79b..9a94674f 100644 --- a/apps/predbat/predbat.py +++ b/apps/predbat/predbat.py @@ -8770,7 +8770,7 @@ def create_entity_list(self): for entity in self.dashboard_index: text += " - entity: " + entity + "\n" - filename = "/homeassistant/predbat_dashboard.yaml" + filename = "/config/predbat_dashboard.yaml" han = open(filename, "w") if han: self.log("Creating predbat dashboard at {}".format(filename)) diff --git a/docs/output-data.md b/docs/output-data.md index 0389a573..95b8cd5b 100644 --- a/docs/output-data.md +++ b/docs/output-data.md @@ -2,7 +2,7 @@ ## Displaying output data -Each config item has an input_number or switch associated with it, you can find an auto generated dashboard for your configuration in your HA configuration area under the filename **predbat_dashboard.yaml** +Each config item has an input_number or switch associated with it, you can find an auto generated dashboard for your configuration in your AppDaeamon configuration area under the filename **predbat_dashboard.yaml** You can also create a card using 'dynamic-entities-card.yaml' for a dynamically created list of entities for predbat which groups the entities by type and is collapsed by default to prevent screen clutter. Requires lovelace-collapsable-cards ([https://github.com/RossMcMillan92/lovelace-collapsable-cards](https://github.com/RossMcMillan92/lovelace-collapsable-cards)) and lovelace-auto-entities ([https://github.com/thomasloven/lovelace-auto-entities](https://github.com/thomasloven/lovelace-auto-entities)) to be installed via HACS as well as the stock vertical stack card. Credit @DJBenson for the code. diff --git a/example_dashboard.yml b/example_dashboard.yml index 28707ef6..4f88016c 100644 --- a/example_dashboard.yml +++ b/example_dashboard.yml @@ -1 +1 @@ -# The predbat dashboard can now be found auto-generated in your home assistant configuration area: predbat_dashboard.yaml +# The predbat dashboard can now be found auto-generated in your AppDaemon configuration area as predbat_dashboard.yaml