Where is the yaml for a card stored

(Probably dumb question time but…)
I have just added the Plotly Graph Card (via HACS) and created a card using one of my existing sensors via the visual editor for the card.

According to the Plotly documentation you need to edit the yaml file for anything advanced. I clicked on the ‘Show Code Editor’ link and I can see the yaml code but just about any thing that I change displays a message saying what I’nm doing is unsupported.

However it then says “You can still edit your config in YAML”.

So I went looking for the .yaml file where this text is stored but I cannot find it anywhere. (Using the terminal the normal tools such as grep and find don;t find anything either.)

Where do I need to look for the yaml file that I need to edit?

Susan

You are using a dashboard in a “storage mode”.
In this mode you can use a UI editor - either to customize your cards by a mouse or by manually editing yaml.
The yaml which you see is generated from json.
So, all your UI views/cards are stored in json in fact (one json file per dashboard).
Editing yaml & saving it → saving changes in json.
If you choose “storage mode” - then probably you do not need a “real yaml file”. Keep editing dashboards/views/cards in UI mode, edit yaml (converted from json) if needed.

Contrary, in “yaml mode” dashboard you have real yaml files for dashboards/views/cards. You may use yaml features like “!include”, “yaml-anchors”, “!secret”, reusing code - but cannot use UI editor.

Thanks for coming back so quickly.

Pardon my ignorance but what is “storage mode” or ‘yaml mode’ and how do I select between them. I’m probably using whatever is the default mode.

In the ‘File Editor’ I can see ‘configuration.yaml’ (that has a !include’ in it) and some of the ‘esphome’ yaml files so does that mean I’m in ‘yaml’ mode’?

Susan

Some info is given here:

default = storage.

yaml-mode is only about a frontend.
Using dashboards in storage mode (which is a default), you may still edit your config (sensors, helpers. automations etc) in yaml files directly.

Thanks for the link - I’ll get reading.

Susan

Do you mean this warning?

The card config uses typ: simple-entity which is only available when you switch to code editor. As long as you can save the card, ignore the warning.

That is the correct way. No need to switch to yaml mode to edit the code directly.

Yaml is dependant on indents being correctly set. I, for example, did not know that before.

Could you maybe post your card code in a code block here and post a screenshot of the error, then we can help out in a more detailed way.

@pedolsky - that is the one I was talking about.

So taking this back to the higher level original question, I take it that there is no way to edit the yaml for a card other than within the card editor itself.

In other words, there is no equivalent to being able to edit the ‘configuration .yaml’ file with an external editor (or even the built in ‘File Editor’).

Thanks all - at least I have started to get the card working the way I want it (the other issues are not related to the ‘plotly’ addin at all).

Susan

I think you’ve pretty much got it.

One thing I do is copy the entire “raw editor” contents to a text file (saved as .yaml) in a directory on my laptop. There I can edit it, and save backups of working copies. I can copy the whole thing back, overwriting the existing yaml in the “raw editor” any time I want. It’s great to be able to restore back to the way it was before I started tinkering with something.

I know, that’s not exactly what you wanted. It’s just what works for me.