home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.47k stars 30.69k forks source link

Script editor not working for script blueprints #123530

Closed nilsreiter closed 2 months ago

nilsreiter commented 2 months ago

The problem

I can create a script from a blueprint just fine, but if I go to Automations > Scripts and open one of these, I get a blank page. As far as I can tell, this is an issue with the script editor and not with the scripts itself.

What version of Home Assistant Core has the issue?

core-2024.8.0

What was the last working version of Home Assistant Core?

core-2024.7.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Scripts

Link to integration documentation on our website

https://www.home-assistant.io/integrations/script/

Diagnostics information

No response

Example YAML snippet

This is copied from scripts.yaml, I have tested with 3 different script blueprints and all lead to the same issue.

confirmable_notification:
  alias: Confirmable Notification
  use_blueprint:
    path: homeassistant/confirmable_notification.yaml
    input:
      notify_device: 8d283940d7324140c9c3594886138d15
      title: Test
      message: Test
  description: ''

Anything in the logs that might be useful for us?

Browser inspector (Chrome) shows me this error message:

> TypeError: Cannot use 'in' operator to search for 'service' in undefined
>    at $ (script.ts:436:7)
>    at t.value (ha-script-editor.ts:491:23)
>    at ha-script-editor.ts:500:29

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (script) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `script` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign script` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


script documentation script source (message by IssueLinks)

erkr commented 2 months ago

Seems a duplicate of https://github.com/home-assistant/core/issues/123468

joostlek commented 2 months ago

Closing as it's a duplicate