not knocking your abilities. I’m just speaking from experience and my understanding of code. Also, I know how it works in regards to updating. It bases its updates on the releases OR the latest fix. The drop down determines that. If you aren’t paying attention to the drop down and update, you could just be installing the same version. Not to mention cache comes into play. If you don’t have a ? at the end of your resource, the browser may not use the update.
So all in all, I’d need to see ALL that information before I say it’s a bug.
There is a github issue with logs etc…
I am actually checking the downloaded code with the previous downloaded code so it’s not a resources issue.
I am well aware how it is supposed to work with releases or latest commit.
If I restart Home Assistant and then tell HACS to reinstall it pulls the right version without changing anything else.
meanwhile I took the last_changed out (since it adds nothing really other than the last time the system is restarted…) and replaced it with the latest commit message, so I can see in a glance what was changed.
#!/bin/bash
cd "$(dirname "$0")"
lovelace_cards=$(cat ui-lovelace.yaml)
darksky_card=$(echo "$lovelace_cards" | grep "dark-sky-weather-card" | head -1 | sed "s/.*\/dark-sky-weather-card.js?v=//")
# Build JSON output
card_installed_string='{"state":"","attributes":{"darksky":"'"$darksky_card"'"}}'
# Home Assistant Config
creds=$(cat abbusage/abbcreds.json)
server=$(echo "$creds" | jq -r '.server')
token=$(echo "$creds" | jq -r '.token')
# Publish to HA with token
curl -X POST -H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "$card_installed_string" \
"$server"/api/states/sensor.lovelace_card_installed
I had the credentials stored in anoter file along with a token. I also was reading other cards originally but removed them as they were added to HACS but you get the idea. It reads the lovelace yaml file to get the current installed version… just parses resources section.
Id need a way to read the resources.yaml file, and find the version number of each loaded resource, to compare those with the tag my GitHub sensors extract from the repo’s…
not immediately obvious how I should handle the, so please let me think on that …
Yes definitely. When I started with the script I had a bunch of cards in there. I just posted my latest version before I didn’t need it anymore as everything I used was in HACS.
Also… I have been using rest sensors to suck data out of github and didn’t realise there was a github integration I could use. Going to try that as I think the rest sensors slow down ha when it starts - and a bunch of log messages about rest platform taking more than 10 seconds… so thanks.
Oh crap… you will need to add them together building the json string. It needs to be 1 string. If you can’t work it out I will post when my computer is on. Too hard on ipad.
etc…
You will only have ONE card_installed_string and the curl command will write that string to a sensor, sensor.lovelace_card_installed in HA. Every card will be an attribute of that sensor and I was using the config-template-vard t display them in my lovelace example above.
I also used an automation to run the script every hour I think.