I have Home Assistant Supervised on Debian 11 and HACS Version Installed: 1.26.2
I am trying to get to the directory “path = /config/.storage/hacs/” but unfortunately I can’t see it on my own. How can I find it?
I have Home Assistant Supervised on Debian 11 and HACS Version Installed: 1.26.2
I am trying to get to the directory “path = /config/.storage/hacs/” but unfortunately I can’t see it on my own. How can I find it?
Why? You are not supposed to touch files inside .storage. There be dragons.
I want to read what HACS repositories have and how many there are in total.
- platform: command_line
name: hacs_installed
command: |-
python3 << EOF
import os, json
installed = {"repositories": []}
path = "/config/.storage/hacs/"
for file in os.listdir(path):
name, ext = os.path.splitext(file)
if ext == ".hacs":
hacs_file = path + file
with open(hacs_file, "r") as file:
dict = json.load(file)
name = dict["data"]["full_name"]
installed["repositories"] += [name]
file.close()
print(json.dumps(installed))
EOF
value_template: >
{{ value_json.repositories | count }}
json_attributes:
- repositories
scan_interval: 86400
but it doesn’t work for me because it doesn’t find the hacs folder
what does
ls /config/.storage
tell you?
Copy and paste is not a new thing you know
Have you got any hacs repos added yet?
Yes, I have 6 integrations and 10 with the user interface. Everything works fine with no problems or log errors.