slider-button-card icon indicating copy to clipboard operation
slider-button-card copied to clipboard

Add support for script domain

Open lizsugar opened this issue 2 years ago • 3 comments

Example usage:

      - type: custom:slider-button-card
        entity: script.turn_off_front
        slider:
          direction: left-right
          background: solid
          use_state_color: false
          use_percentage_bg_opacity: false
          show_track: false
          disable_sliding: true
          force_square: false
          tap_action:
            action: call-service
            service: script.turn_off_front
        show_name: true
        show_state: true
        compact: false
        icon:
          show: true
          use_state_color: false
          tap_action:
            action: more-info
          icon: ''
        action_button:
          mode: toggle
          icon: mdi:power
          show: false
          show_spinner: true
          tap_action:
            action: toggle
        show_attribute: false

Looks like this: image

and tapping the card runs the script, with a visual and state change while the script is running

lizsugar avatar Jun 02 '22 20:06 lizsugar

whew, it included all the commits that haven't already been applied upstream even though i forked it much later 😅

well i honestly have no idea what this means, how it happened, or how to fix it wtf image

lizsugar avatar Jun 02 '22 20:06 lizsugar

Is https://github.com/custom-cards/slider-button-card/pull/11/commits/8c57bf8e5aa6d8ac1733cd205a00554935d081cd the only commit that should be part of this PR? If so, I think we can fix it by cherry-picking that commit onto a new branch that starts from this repo's main branch. If it's more than that one commit, you should be able to cherry pick each of them over to the newly created branch.

Let me know if that works or if you want me to give it a try.

rohankapoorcom avatar Jun 03 '22 00:06 rohankapoorcom

I ran a rebase on this branch against the custom-cards/main branch with git rebase -i upstream/main, removing all but the commit I mentioned in my previous comment and then resolved any conflicts and pushed it up here: https://github.com/custom-cards/slider-button-card/tree/rebased_script_domain

Feel free to close this PR and make a new one from that branch or force push that branch onto your own. Either way should work (assuming I got the correct commit).

rohankapoorcom avatar Jun 05 '22 00:06 rohankapoorcom