purifier-card icon indicating copy to clipboard operation
purifier-card copied to clipboard

Target parameter has to be used instead of service_data for shortcuts (wrong parameter order)

Open philw07 opened this issue 1 year ago • 2 comments

Thanks for this card. I just noticed that the target and service_data parameters are in the wrong order in this call.

https://github.com/denysdovhan/purifier-card/blob/b207c37a71996207925793ae9a1c71a60b39d1d0/src/purifier-card.ts#L350

Function signature with different order here: https://github.com/denysdovhan/purifier-card/blob/b207c37a71996207925793ae9a1c71a60b39d1d0/src/purifier-card.ts#L110

I added shortcuts for oscillation (target not used) and wondered why they weren't working, but then noticed I actually had to use target instead of service_data due to this issue

  - name: Oscillate On
    icon: mdi:arrow-oscillating
    service: fan.oscillate
    target:
      oscillating: true

philw07 avatar Jul 21 '24 16:07 philw07

thanks for your comments, I was able to update my broken card with this

gado4525 avatar Jul 31 '24 13:07 gado4525

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!

github-actions[bot] avatar Sep 29 '24 14:09 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

github-actions[bot] avatar Oct 29 '24 14:10 github-actions[bot]