Restore backup from a big mistake

Hi to all, I migrate to raspbian to home assistant os, I make 3 different backup and one manual backup file by file, folder by folder.
I lost only one thing, the backup are encrypted…now I lost my last 4 years of work.
I replaced all files and folders, and now I see the automations, helpers and scripts, only this.
How can I recover at least the graphic part?
Thanks for any help

If you have the contents of the original config folder (including the .storage folder in it) then you can copy that over your new config while HA is down. If you don’t have that and all your backups are encrypted then you are out of luck.

That would be the homeassistant folder (also called config for backwards compatibility). Everything except addons is in there if you also have all its subdirectories. But you can only copy then correctly if Home Assistant is not running.

How can?
With home assistant os what’s I have to do?

Hi have and idea.i have a tablet with fully kiosk, now it’s running old Lovelace menu because it’s in cache.
The eather bar is hidden, how can I see it and go to raw editor with tablet

Open one of the SSH add-ons, and give the command

ha core stop

I did it before the last post. Only a bit of thousands thing was found.
My today goal is to find the Lovelace grafic

If it is only a dashboard you are missing, when logged in as the user with admin rights, go to settings, dashboards and see what is there.

There is nothing. I have only automation e scripts because there is automation.yaml e script.yaml

When you copied the files, did you also copy the .storage folder, which resides in the same place as the automations.yaml and scripts.yaml? That is where your gui built dashboards are kept, among other things. It is the cental storage of HA. Your configuration is not just the yaml files in the home assistant directory, but also all the contents of the subdirectories there. The folders starting with a . are internal to HA, but you need them too.

If you did copy storage, it might just be that you have no admin rights and the dashboards are not shown because of that. If you did not copy the .storage folder, then you are missing way more than just your dashboards I presume. Then you also miss integrations, customizations, etc.

If you do not have the original .storage folder then you basically need to rebuild everything, and scripts and automations is all you have for reference. But depending on how you set them up you might need to rebuild those too, especially if you relied heavily in device triggers, conditions and actions.

1 Like

Now I have rebuilt 90% of automations, I’m now resigned to doing it all over again.
Now I want to rebuilt the gui, but I am stuck for all the day at the beginning.
I have an input text that day change at night the value by an automation, for example 1, 40, 3, 5 etc.
With this input I change a background of a picture elements card, I had a code line like a image: /local/“input_text.wallpaper”.jpg
In local/www I have several image called 1.jpg 2.jpg 3.jpg etc.
Maybe I had use card mod, but I don’t remember what I did

type: picture-elements
image: /local/90.jpg
entity: input_boolean.natale
state_image:
“on”: /local/Sfondi/90.jpg
“off”: /local/Sfondi/{{ states(‘input_text.sfondo’) }}.jpg
elements:

  • type: state-label
    entity: input_boolean.natale
    style:
    top: 10%
    left: 10%
    color: white
    On work, off doesn’t work. Input is set to 90

Just for clarification, local is the reference for the www folder. So to access images, there has to be a www folder and in your case a sub-folder called Sfondi

image: /local/90.jpg This code would reference an image in /config/www

/local/Sfondi/90.jpg would reference an image in /config/www/sfondi

Yes I know, I have did many test and I have an image also in www called 90.jpg
The problem is the line on the off state

From my recollection, you need to use type: 'custom:config-template-card' to template the image field or use card mod.

Look here

I would suggest an alternative mehod. Create a sensor template that references the image and state of the text input helper.

An example

     text_input:
       friendly_name: "Text Input"
       unique_id: text_input
       value_template: |
         {% set level = states('input_text.test')  %}
    
       entity_picture_template: >-
          {% set level = states('input_text.test')  %}
          {% set path = "/local/pics/" %}
          {% set ext = ".png"%}
          {{[path,level,ext]|join("")}} 

I created a 1.png and a 2.png and the image of sensor.text_input changes based on the state of the input_text.test

I became crazy, i try hundred times with 0 results.
I did this code e only thing i see is 99, if i write 99 instead of {{ sfondo }} i see the image


type: custom:config-template-card
entities: "input_text.sfondo"
variables:
  sfondo: states['input_text.sfondo'].state
card:
  type: picture-elements
  image: /local/Sfondi/{{ sfondo }}.jpg
  elements:
    - type: state-label
      entity: input_text.sfondo
      style:
        top: 5%
        left: 5%
        color: white