custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.93k stars 233 forks source link

Fails to call service: connection lost #715

Closed Zynth-dev closed 1 year ago

Zynth-dev commented 1 year ago

Checklist

Describe the bug When calling a service from the tap_action, the connection to that service seems to be lost. The given error: "Failed to call service remote/send_command. Connection lost" When I change the type from "type: custom:button-card" to "type: button" it does work.

Version of the card Version: 3.5.0

To Reproduce This is the configuration I used: Reminder: changing type from "custom:button-card" to "button" makes the tap_action complete successfully So

      - color_type: card
        aspect_ratio: 1.8
        tap_action:
          action: call-service
          service: remote.send_command
          target:
            device_id: e582b91dd1f7f655ed06c587fa78f41e
          data:
            num_repeats: 1
            delay_secs: 0.4
            hold_secs: 0
            command: power
            device: duux
        entity: script.do_nothing
        icon: mdi:fan
        name: Power
        template: defaultcard
        type: custom:button-card

Screenshots If applicable, add screenshots to help explain your problem.

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Zynth-dev commented 1 year ago

Configuration options of the custom button differs from the configuration options of the standard button. I have solved the issue by rtfm...