home-assistant / frontend

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

Missing data and target when converting buttons from call-service to perform-action #21659

Closed tronikos closed 3 weeks ago

tronikos commented 1 month ago

Checklist

Describe the issue you are experiencing

Existing buttons with call-service get converted to perform-action but lose the data and target.

For example this:

show_name: true
show_icon: true
type: button
icon: mdi:circle
tap_action:
  action: call-service
  service: remote.send_command
  data:
    command: DPAD_CENTER
  target:
    entity_id: remote.kitchen_tv

When edited becomes:

show_name: true
show_icon: true
type: button
icon: mdi:circle
tap_action:
  action: perform-action
  perform_action: remote.send_command
  data:
    command: {}
  target: {}

Describe the behavior you expected

Don't lose data and target.

Steps to reproduce the issue

  1. Create a new button card with the above code and save
  2. Edit the card and observe the action doesn't have data and target.

What version of Home Assistant Core has the issue?

2024.8.0

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

No response

Additional information

No response

pedolsky commented 1 month ago

2024.8.1 resolved the issue (in my case)

piitaya commented 3 weeks ago

@pedolsky 2024.8.1 only partially fixed the issue. I submitted a PR for the fix.