Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWITCH: Action button not working for Call service #77

Closed
KirkKirk opened this issue Jul 7, 2024 · 2 comments
Closed

SWITCH: Action button not working for Call service #77

KirkKirk opened this issue Jul 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@KirkKirk
Copy link

KirkKirk commented Jul 7, 2024

Checklist:

  • [x ] I updated to the latest version available
  • [ x] I cleared the cache of my browser

Release with the issue: v1.13.0

Last working release (if known): n/a

Browser and Operating System: hass / chrome / win10

Description of problem: Failed to call service switch/toggle. must contain at least one of entity_id, device_id, area_id, floor_id, label_id.

Javascript errors shown in the web inspector (if applicable):

type: custom:slider-button-card
entity: number.boiler_controler_set_power
show_state: true
slider:
  direction: left-right
  background: gradient
  use_state_color: true
  compact: true
  toggle_on_click: true
  use_percentage_bg_opacity: true
  show_track: true
  force_square: false
icon:
  icon: ''
  tap_action:
    action: none
  show: true
  use_state_color: true
show_attribute: false
show_name: true
compact: false
action_button:
  mode: custom
  show: true
  show_spinner: true
  tap_action:
    action: call-service
    service: switch.toggle
    target:
      entity_id: switch.boiler_controler_boiler_overide_switch
    data: {}

# End of code

Additional information:

@KirkKirk KirkKirk added the bug Something isn't working label Jul 7, 2024
@rohankapoorcom
Copy link
Member

There's a known bug with the yaml generation from the visual editor (#73).

Replacing target with service_data should fix the problem.

type: custom:slider-button-card
entity: number.boiler_controler_set_power
show_state: true
slider:
  direction: left-right
  background: gradient
  use_state_color: true
  compact: true
  toggle_on_click: true
  use_percentage_bg_opacity: true
  show_track: true
  force_square: false
icon:
  icon: ''
  tap_action:
    action: none
  show: true
  use_state_color: true
show_attribute: false
show_name: true
compact: false
action_button:
  mode: custom
  show: true
  show_spinner: true
  tap_action:
    action: call-service
    service: switch.toggle
    service_data:
      entity_id: switch.boiler_controler_boiler_overide_switch

@KirkKirk
Copy link
Author

KirkKirk commented Jul 9, 2024

thanks @rohankapoorcom.
It does fix the problem.
Cheers

@KirkKirk KirkKirk closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants