@DvdNwk I am afraid of turning my HA (operational) unit into a brick - cause something locked it up. Yes - I have backups - but that is always dicey. Backups are good and necessary if something unforeseen happens. If I had a sandbox or safe zone to operate in, test things out, that would be another issue.
So - like to ask the collective brain (that would be all of you), is this novice on the right path, and at least a face value, nothing looks dangerous.
So - do I presume - this coding looks…generally ok? My risk - I know.
Thanks.
@DvdNwk THANK YOU! Your guidance and counsel were spot on. It worked.
Code looks like
rest_command:
mbedroom_shades_up:
url: "https://hghst.net:9443/set/xxxxxxxxxxxxxxxxxxx/open/12"
method: get
content_type: "text/plain"
mbedroom_shades_down:
url: "https://hghst.net:9443/xxxxxxxxxxxxxxxxxxx/favorite/12"
method: get
content_type: "text/plain"
The one problem I came across is - the quotation marks in MS Word and the quotation marks in YAML are different. Having read another unrelated HA community discussion, I recalled this comment, went back, looked real hard at my quotation marks, changed them…and WHAMO everything worked.
no - no. I did the concept in MS Word…then placed in this thread. Not the actual coding for the YAML.Config file. My mistake when I was copying code from one editor to another.
Yes - I have installed and normally use Studio Code Server. Long story, I was on different computers, moving code back and forth… ugh.
@DvdNwk On a side note, What is/are a good reference(s) to learn YAML? My search seems to reveal it is a learn as you go effort. There must be some good sources with examples
YAML as a notation/format is pretty simple: all it cares about are the indents, haha.
The more complicated thing is what to write in YAML → the domain values, what HA wants you put in YAML format.
I’m struggling here as well, even though I’m a programmer. It helps for sure to know basic programming ideas, like variables, variable types, structures, loops, conditions, etc.
Just try to learn from the docs and experiment. Google a lot. Ask here, ask on Discord.
You’ve seen REST docs, there you go: the values that you can use, examples, etc.
As for the Templates, there is additional step of yet another language inside: Jinja2.
I just write snippets there and copy them wherever I need. I don’t even delete them, they serve as a future reference to something I already figured out.
Last thing, all of it is powered by Python.
A big journey, it’s programming after all. But a fun journey → especially when something is finally starting to work Good luck