home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.96k stars 2.69k forks source link

Enabling any "Advanced Options" in light.turn_on kills the visual editor #21629

Closed karwosts closed 6 days ago

karwosts commented 1 month ago

Checklist

Describe the issue you are experiencing

image

Describe the behavior you expected

as above

Steps to reproduce the issue

  1. as above
  2. ...

What version of Home Assistant Core has the issue?

2024.7 & 2024.8

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

No response

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

none

Additional information

No response

silamon commented 1 month ago

The advanced_fields doesn't specify a selector in the service config. It's a core issue for the light integration.

karwosts commented 1 month ago

advanced_fields isn't supposed to have a selector, it's supposed to be a collapsable section. This was a newly implented thing a month or two ago, but seems it may not have been done correctly.

I'm not sure if this is core or frontend issue, or a mixup between the two.

silamon commented 1 month ago

The logic is here: https://github.com/home-assistant/frontend/blob/dev/src/components/ha-service-control.ts#L374 Every field that has a visual ui should be listed in the service data information we retrieve from backend. Currently, the advanced_fields is not listed as field, and their children not either. From as soon as you use one, it will revert to yaml.