Problems with new custom_updater features - Split off from My Lovelace Plugins

Ok, I did not check the difference but manually updating the card fixed.

Unfortunately before that I reed this:

and updated my resources to the new style. To be sure I have the newest version I copied the custom update file from git to my custom components folder again.
I also added

mode: storage

Now, no cards show up in my updater card.

resources:
  - url: /customcards/monster-card.js
    type: js
  - url: /customcards/toggle-lock-entity-row.js
    type: js
  - url: /customcards/tracker-card.js
    type: js
  - url: /customcards/custom-lovelace/swipe-card/swipe-card.js
    type: module
  - url: /customcards/auto-entities.js
    type: js
  - url: /customcards/card-tools.js
    type: js   
  - url: /customcards/mini-media-player-bundle.js
    type: module      

I still have the files in www/

If you have them in www/customcards the url should be

url: /local/customcards/…

I have them in www not www/customcards

From this version you NEED to change your resource url’s from /local/ to /customcards/ for all cards that you update with this component.
On your filesystem you will still place the cards under /www/ , this change is only for under resources in your lovelace config.

I see. Thanks a lot!

  1. Have you hit “update all” since then? It suggests that you have to do it once after the update

  2. Is your lovelace config stored using storage (edit via the configure ui option available in the top right corner of Home Assistant, or yaml (“lovelace: mode: yaml” (with appropriate indents and returns) in your config, and edit in ui-lovelace.yaml)? I suspect the storage mode option makes it look at the storage mode config, so if you aren’t using that, it won’t see the list of things to check.

  1. yes, did not change

  2. I use yaml-mode. I only added

mode: storage
to custom updater.

I did open a file in the invisible .storage folder. Don’t know what else to do?

I think you don’t want mode: storage for custom updater UNLESS you are using mode: storage (or unconfigured) for lovelace. Lovelace using storage mode stores in a different location than yaml mode, so I assume that config is telling custom-updater to look at the storage mode config for what it needs to keep and eye on, rather than the default yaml mode ui-lovelace.yaml.

I’d guess you just need to remove the mode: storage from custom updater and it’ll work

1 Like

You are right, I didn’t think about what storage does, thought it’s a new feature and let’s add it.

Removing this line and restarting fixed it.
So the storage mode is only a thing you use, when you dont use the yaml mode in lovelace right?

  1. Also another quick question
  • url: /customcards/tracker-card.js?track=true
    type: module

what does ?track=true do? Should I leave it like that?
Have it from here. https://github.com/custom-cards/tracker-card

Also the link gives this example:

  - url: /customcards/github/custom-cards/tracker-card.js?track=true
    type: module

Is it still ok to pick out the tracker-card.js file and place it in www? and than

  - url: /customcards/tracker-card.js?track=true
    type: module

My last version wasn’t type: module, it was type: js

Side question: So lovelace has two modes: storage (where you can config things in the ui) and yaml (config in yaml-file), right?

Storage mode is the alternative to yaml that is slightly less “just edit the files” than yaml mode (I assume as part of trying to make Home Assistant a little less indepth to manage for newer users). It was added a couple of updates ago.

No idea what ?track=true does, if anything, for the tracker card.

Lots of the lovelace plugins seem to be switching to using module rather than js for their type, haven’t actually looked indepth at what the differences are, but from our point of view as users it doesn’t make any difference. Still put them in www as before.

I believe lovelace actually has three modes, auto-generated, storage, and yaml.

Auto-generated builds something similar to the old, pre-lovelace, ui, and automatically adds things to it. Not actually looked at it since they added it.

Storage is edited through the webpage, the gif on the tracker-card github you linked shows adding the tracker card in it.

Yaml is what we originally had with lovelace when it first launched, edited through the config file, and what many of us are used to.

Thanks for making that clear for me.

HA developers so fast, it’s hard to follow everything.

About the tracker_card question. The only file I need is the tracker_card.js file right. There was also a custom_updater file in the dowloaded folder from gut that confused me.

I also like editing my config in a yaml file the most.

Also I don’t care about if it is a module or js, but the thing I’m wondering about is custom updater in that regard.
I update my cards with custom_updater. The component showed me that everything was up to date.

However, it did not change the type of the tracker card from js to module.
So if it updates and is a module now, there is still the line in the yaml file that says js.

I have to say that I missed the new style (Auto update) for the resources (for version 4.0.0 of custom updater).
Maybe that is the reason why my auto-entities did not update right?
I’m also wondering why it still worked, when I had the wrong layout (local instead of custom_components).

A lot of questions🙊

it looks like it doesn’t do anything anymore…maybe…it’s still kind of confusing tho.

Mine is working without it and if yours is working without it then i’d say you don’t need it.

The ?track=true does not do anything for existing cards (that you allready have installed)
But it’s a part of a concept I’m calling “super_custom_cards” (my imagination department are lacking) that can help with the installation of new cards https://github.com/custom-components/custom_updater/wiki/super_custom-cards

You need custom_updater component for the backend, and you can use tracker-card to display it in lovelace.

That was bad and I should never had done it, and even then it did not update the type.

Local still works* the issue with using that is that it will cache the cards, something /customcards/ do not do.

There are so may things posted to this forum I will not see them all, if you have any issues/questions about this component that you want me to look into please open an issue here https://github.com/custom-components/custom_updater

@ludeeus thanks.

What I ment is do I only need the one tracker-card file from here:
https://github.com/custom-cards/tracker-card?files=1

There is also a

custom_card.json

What is it for? Should this go to the same folder?

Should we keep the ending ?track=true ?

What do you by should have never done it? Autoupdate?
So am I fine with keeping the new style without local?
The advantage is that we don’t need the ending ?=vXXX right?

That was something that I tested and did not implement, the file is gone now.

Change the configuration file, earlier I wrote to the config file to update ?v=X.X.X

url: /customcards/my-awesome-card.js is enough with this version :slight_smile:
as long as that card is in www/my-awesome-card.js

basicaly, yes
it does more, and some of it are documentet in the wiki, and some of it I’m just too damn lazy to write :man_shrugging:

I still don’t get what you mean with that. Sry, but isn’t that important. It works and that’s fine.

1 Like

Any reason the button image isn’t showing up?

49%20AM

do you have a custom theme enabled?

the buttons are there. that’s what the “check” and “update all” are. you just can’t see the outlines.

I cleared cache and the buttons showed up. Weird.

After upgrading to 0.88.1 i always get this error:

2019-02-23 11:07:38 ERROR (MainThread) [frontend.js.latest.201902200] https://myduckdns.duckdns.org/customcards/lovelace/resources/tracker-card.js:201:54 Uncaught TypeError: Cannot read property 'addEventListener' of null

I’m getting this in developer tools:

And the tracker card is not shown… how to fix? Running 1.2.3 release