-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Checklist:
- [x ] I updated to the latest version available
- I cleared the cache of my browser
Release with the issue:
V3.3.0
Last working release (if known):
NA
Browser and Operating System:
Librewolf, Windows 10
Description of problem:
- I created a custom slider card to control lights.
- I set the light entity
- Under icon I set the action to "Call Service"
- Set Service to "light.turn_on".
- Set Target to "light.example_light_entity".
- Test by clicking light bulb icon
- Result:
- Code generated:
type: custom:slider-button-card
entity: light.example_light_entity
slider:
direction: left-right
background: gradient
use_state_color: true
use_percentage_bg_opacity: false
show_track: false
toggle_on_click: false
force_square: false
show_attribute: false
show_name: true
show_state: true
compact: false
icon:
show: true
use_state_color: true
tap_action:
action: call-service
service: light.turn_on
service_data:
entity_id: light.example_light_entity
icon: ''
action_button:
mode: toggle
icon: mdi:power
show: true
show_spinner: true
tap_action:
action: toggle
- Do a bunch of troubleshooting...
- Find list of YAML on Github
- modify "target:" to "service_data:"
type: custom:slider-button-card
entity: light.example_light_entity
slider:
direction: left-right
background: gradient
use_state_color: true
use_percentage_bg_opacity: false
show_track: false
toggle_on_click: false
force_square: false
show_attribute: false
show_name: true
show_state: true
compact: false
icon:
show: true
use_state_color: true
tap_action:
action: call-service
service: light.turn_on
service_data:
entity_id: light.example_light_entity
icon: ''
action_button:
mode: toggle
icon: mdi:power
show: true
show_spinner: true
tap_action:
action: toggle
- Icon calls service properly.
So, I'm not sure if it's HA generating the YAML or the card generating it but depending on a different (possibly older) syntax, but it's not smooth and without an explanation in docs (that I found), it took me a bit to figure it out. I don't have the knowledge to dive into the code on this one, but just wanted to make mention in case anyone has the same issue, or is interested in finding a solution outside of manually changing the YAML each time a visual edit is made in that area of the card.
Thanks to everyone maintaining this! You all are awesome and appreciated. I wish I could be more helpful that just bringing this up.
Javascript errors shown in the web inspector (if applicable):
Additional information: