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

YAML not generated correctly #73

Open
1 task
patienttruth opened this issue Mar 15, 2024 · 3 comments
Open
1 task

YAML not generated correctly #73

patienttruth opened this issue Mar 15, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@patienttruth
Copy link

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:

  1. I created a custom slider card to control lights.
  2. I set the light entity
  3. Under icon I set the action to "Call Service"
  4. Set Service to "light.turn_on".
  5. Set Target to "light.example_light_entity".
  6. Test by clicking light bulb icon
  7. Result:
    image
  8. 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
  1. Do a bunch of troubleshooting...
  2. Find list of YAML on Github
  3. 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
  1. 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:

@patienttruth patienttruth added the bug Something isn't working label Mar 15, 2024
@rohankapoorcom
Copy link
Member

I think the visual editor for the card is broken, but haven't had a chance to debug and fix it yet.

@patienttruth
Copy link
Author

I think the visual editor for the card is broken, but haven't had a chance to debug and fix it yet.

Right on. Thanks for everything, just wanted to report so it can be on the radar.

@patienttruth
Copy link
Author

I think the visual editor for the card is broken, but haven't had a chance to debug and fix it yet.

Right on. Thanks for everything.

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