lovelace-notify-card icon indicating copy to clipboard operation
lovelace-notify-card copied to clipboard

Can this card work with 'input_select' helpers?

Open zala143 opened this issue 2 years ago • 3 comments

This is a great frontend card, thanks for creating it. This card would be amazing if you could specify a list of targets via yaml list or input_select.

Then from the frontend card, have a dropdown menu that allows you to select the target notify source you want to send to. Added bonus, if you could also write a custom message or also select from a pre defined message again from an input_select helper.

Thanks in advance,

zala143 avatar May 29 '22 22:05 zala143

I achieved this using an input_select and using conditional cards to show depending on the input_select value.

type: vertical-stack
cards:
  - type: entities
    entities:
      - input_select.tts_source
  - type: horizontal-stack
    cards:
      - type: conditional
        conditions:
          - entity: input_select.tts_source
            state: Phone
        card:
          type: custom:notify-card
          target: pushover
          label: Notify phone
          card_title: Send Notification
      - type: conditional
        conditions:
          - entity: input_select.tts_source
            state: Amazon Echo
        card:
          type: custom:notify-card
          target: alexa_media_kevin_s_echo
          data:
            type: tts
          label: Notify Amazon Echo
          card_title: Send Notification
      - type: conditional
        conditions:
          - entity: input_select.tts_source
            state: LG TV
        card:
          type: custom:notify-card
          target: lg_webos_smart_tv
          label: Notify TV
          card_title: Send Notification
Screenshot 2022-09-07 at 19 43 27

KevSex avatar Sep 07 '22 18:09 KevSex

This is exactly what I want to do. If I understand this correctly, if i want to be able to select between a bunch of speakers, I have to create a helper and then copy and paste for each condition? Is there a more programmatic way of doing this to avoid copy and pasting?

ignacio82 avatar Sep 11 '22 17:09 ignacio82

That's just the way I've done it - not to say it can't be done however when I last checked, it didn't seem possible.

This card has different parameters depending on the device you're looking to send messages to so I don't see how it could be possible without having separate cards per device and hiding them using a conditional card.

If you find a way, let us know :)

KevSex avatar Sep 11 '22 19:09 KevSex

there is currently no plan to implement this, please use conditional cards as described instead

bernikr avatar Aug 19 '24 17:08 bernikr