Add description field in UI script editor

Is it possible to add a description field in the UI script editor, like the one in the automation editor?

You can include a description in the yaml and this will survive subsequent editing in the UI, but it is not displayed.

Also, the automation editor allows the use of markdown. Something similar for scripts would be helpful.

You mean this?

Same basic schema as the automations, also available in the UI and the YAML code editor.

User-created documentation embedded within HA.

If you are finding that the script one acts different from the automation, it should be written up as a feature parity defect, but I thought they worked the same.

I tested it too. It doesn’t look like it works.
I’m thinking a “feature Parity” issue is in order maybe.
Sorry to ping you @karwosts but is there something we are missing here, or indeed is the script description visibility in the ?UI code different from the Automation description visibility in ther UI?

Should this be written up?

Automation in UI:

Automation in yaml:

alias: Lighting landing
description: >-
  Turns landing spotlights on and off with motion sensor. Brightness of 75%
  during the day to avoid glare. 40% at night.

  ### Revision History

  **23.4.2024** Reduced stay on time from three to two minutes.

  **24.4.2024** Changed action section to choose to prevent flash when dimmed
  spotlights turn off.

Script in UI:

Script in yaml:

alias: Restart router
description: >-
  Switches off routeer socket for 30 seconds, then creates persistent
  notification and sends SMS. \n\n### Revision History\n\n**22.4.2024** Run
  speedtest and add new download speed to SMS and notification
1 Like

I got the same results, so maybe the UI expert I asked can advise.
I would think those should have feature parity unless I’m missing something.

I think it’s a reasonable ask for them to be treated the same, and I think it would be good for the codebase to standardize.

I’m not familiar with the history here, but I would guess that someone wrote up one or more features for the automation editor and forgot to apply it to script editor as well.

The feature request here or one in frontend (which also exists) I think is a fine place for this request.

1 Like

Requests added.

I’ve merged a PR to add a markdown box for rendering the script descriptions in the UI editor, and there’s a second one still in the works for updating the entire script editor UI to have the same functionality as automations.