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

fire-dom-event in shortcuts not working #855

Open
madjetey opened this issue Aug 23, 2024 · 0 comments
Open

fire-dom-event in shortcuts not working #855

madjetey opened this issue Aug 23, 2024 · 0 comments

Comments

@madjetey
Copy link

Trying to fire a browser-mod popup off a shortcut button but I'm not getting much luck. Keep getting the error Failed to perform the action fire-dom-event/undefined. required key not provided @ data['service']. Got None.

The popup works fine in tap_action on the entire card though. Using the light & telephone buttons to test the call-service.

type: custom:mini-media-player
entity: media_player.android_tv_192_168_1_216
name: Main Hall Cast
source: icon
artwork: material
shortcuts:
  columns: 4
  hide_when_off: true
  buttons:
    - icon: mdi:lightbulb
      type: service
      id: light.toggle
      data:
        entity_id: light.main_hall_lights_l2
    - icon: mdi:phone-classic
      type: service
      id: fire-dom-event
      data:
        action: fire-dom-event
        browser_mod:
          service: browser_mod.popup
          data:
            title: Tablet Setup
            timeout: 200
            content:
              square: true
              columns: 3
              type: grid
              cards: null
    - icon: mdi:remote-tv
      type: service
      id: fire-dom-event
      data:
        action: fire-dom-event
        browser_mod:
          service: browser_mod.popup
          data:
            title: Cast Controls
            dismissable: true
            size: normal
            card_mod:
              style: |
                ha-dialog$:
                  div.mdc-dialog div.mdc-dialog__scrim {
                    backdrop-filter: blur(5px);
                  }
                ha-dialog {
                  --vertical-align-dialog: center !important;
                  --mdc-dialog-min-width: 50px;
                  --mdc-dialog-max-width: 400px;
                  --mdc-dialog-min-height: 350px !important;
                  }
            content:
              type: vertical-stack
              cards:
                - type: custom:android-tv-card
                  card_mod:
                    style: |
                      }    ha-card {
                      margin-bottom: 20px;    }
                  remote_id: media_player.android_tv_192_168_1_216
                  keyboard_id: media_player.android_tv_192_168_1_216
                  media_player_id: media_player.android_tv_192_168_1_216
hold_action:
  action: more-info
tap_action:
  action: fire-dom-event
  browser_mod:
    service: browser_mod.popup
    data:
      title: Cast Controls
      dismissable: true
      size: normal
      card_mod:
        style: |
          ha-dialog$:
            div.mdc-dialog div.mdc-dialog__scrim {
              backdrop-filter: blur(5px);
            }
          ha-dialog {
            --vertical-align-dialog: center !important;
            --mdc-dialog-min-width: 50px;
            --mdc-dialog-max-width: 400px;
            --mdc-dialog-min-height: 350px !important;
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant