Adding comments tags to automations, scripts, scene etc

I’d like to see an action called comment or commentary.

It’s not a yaml #comment, just an empty action ( ala a NOP in assembly language)

Just like most actions it has a text field you can provide commentary, but does nothing at runtime.

Extra credit the runtime engine ignores this action during parsing

1 Like

I vote for this - as former professional software developer I miss commenting my code very much!

Me too. The ui scripting is the only programming language I ever saw with no comment facilities, all the way back to PDP8 assembler. If the comments exist in the original yaml, removing them is major vandalism IMHO.

Hi,
I actually can’t believe that such a valuable and useful feature, which has been requested for a long time, hasn’t been implemented yet.
I have no programming knowledge and therefore can’t evaluate what the problem is, but I still hope that it can be implemented.
Voted for this request and hope there will more users find this request and vote for it
thx.

Hi,
I actually can’t believe that such a valuable and useful feature, which has been requested for a long time, hasn’t been implemented yet.
I have no programming knowledge and therefore can’t evaluate what the problem is, but I still hope that it can be implemented.
Voted for this request and hope there will more users find this request and vote for it
many thanks

I quite reasonably expected my commented out block of code to be preserved through the editing process. Because it wasn’t I have lost a fair bit of work that I will now have to try to recreate. At the very least, if we can’t figure out how to store both the raw YAML and the parser output, please at least implement a warning on save if comments are present in the YAML.

It is now possible to include alias of what each action does, both via YAML and via UI. Just use alias.


description: ""
mode: single
triggers:
  - trigger: time_pattern
    minutes: "0"
    alias: Each minute
conditions:
  - condition: time
    after: "18:00:00"
    alias: ">18h"
actions:
  - alias: Turn on light
    action: light.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: light.light

I know comments have been requested a bit here, but this one is different.

The GUI programming interface is a great way to code for people who don’t want to work under the hood too much. Although I miss a simple feature which is best explained with this screenshot how it could look like.

I am not asking for commenting within the code, but more like being able to add a manual description directly to each code block. Hope this makes sense.

1 Like

You can change the wording you see on that screen. They are auto generated right now. So where you see Conditionally execute an action you can change that to Turn up the light at night only.

Duh…I am sorry. Thanks petro, I didn’t even think that would be a possibility. Of course that absolutely does the trick. :face_with_hand_over_mouth: oh well, my excuse is that I am a newbie.