-
I've seen that anytime there is a "y" or "y#" (e.g. "y1") in the YAML as a key, it is in quotes. But the same is not true for "x". Why is y usually in quotes? I removed the quotes from some of my cards and didn't see any noticeable change in the plots, but presumably it is done for some reason. Below is an example taken straight from the README, as an example" type: custom:plotly-graph
entities:
- entity: sensor.temperature1
layout:
annotations:
- x: 1
xref: paper
"y": 1
yref: paper
showarrow: false
text: "📊"
captureevents: true
on_click: $ex () => { window.location="/history?entity_id=sensor.temperature1"; } Are there any other keys besides "y" that should be in quotes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Good question! It doesn't need quotes, it's just that that yaml is internally stored as json and when home assistant transforms it back to yaml it some times adds it back. In a nutshell: no keys need to be quotes, nothing to worry about :) |
Beta Was this translation helpful? Give feedback.
Good question! It doesn't need quotes, it's just that that yaml is internally stored as json and when home assistant transforms it back to yaml it some times adds it back.
I think it's a quirk of the yaml stringifier, probably because y can also mean true (from yes).
The json intermediate also explains why comments get wiped and yaml anchors are expanded.
In a nutshell: no keys need to be quotes, nothing to worry about :)