UI icon indicating copy to clipboard operation
UI copied to clipboard

room-card unable to show popup with browser mod

Open davidepanato opened this issue 2 years ago • 4 comments

Describe the bug I would like to open a popup when user clicks on one entities. it looks like browser mod is not working in this case and tap_action remains set as toggle.

To Reproduce Sample code:

  - type: "custom:button-card"
    template:
      - card_room
    name: Soggiorno
    entity: climate.soggiorno
    icon: mdi:table-chair
    tap_action:
      action: toggle
    variables:
      label_use_temperature: true
      label_use_brightness: false
      entity_1:
        entity_id: light.luci_soggiorno
        templates:
          - yellow_on
        tap_action:
          action: more-info
      entity_2:
        entity_id: climate.soggiorno
        templates:
          - red_off
        tap_action:
          action: none
      entity_3:
        entity_id: climate.clima_soggiorno
        templates:
          - green_on
          - red2_off
        tap_action:
          action: fire-dom-event
          browser_mod:
            command: popup
            title: TEST
            card:
              type: button
              entity: sensor.generale_consumi_power

Expected behavior A popup should appear with title TEST and a card. What i get is that climate.clima_soggiorno is toggled Browser mod is working everywhere else in my dashboard, it is failing only in that case.

Thanks! Davide

davidepanato avatar Mar 02 '22 10:03 davidepanato

it's not working for me neither. i've the same need.

thiagobucca avatar Mar 03 '22 03:03 thiagobucca

any news on this problem?

davidepanato avatar Mar 29 '22 21:03 davidepanato

I don't think the items do support the parameters needed for a popup. As the supported parameters are:

  tap_action:
    action: >
      [[[ if (variables?.tap_action?.action) return variables.tap_action.action; else return 'none'; ]]]
    entity: "[[[ return variables.tap_action.entity; ]]]"
    navigation_path: "[[[ return variables.tap_action.navigation_path; ]]]"
    url_path: "[[[ return variables.tap_action.url_path; ]]]"
    service: "[[[ return variables.tap_action.service; ]]]"
    service_data: "[[[ return variables.tap_action.service_data; ]]]"

basbruss avatar Mar 30 '22 12:03 basbruss

I just spent half a day trying to get the popup showing and then found this issue here. I would really appreciate it if this gets solved asap.

massaquah avatar Apr 30 '22 18:04 massaquah

Should be possible now with the custom_popups feature.

basbruss avatar Oct 13 '22 06:10 basbruss

Could you point me in the direction where I could find how to make this work? No idea if this is the right approach but I can't find what the proper way is. This is my card config:

    - type: 'custom:button-card'
      template:
        - card_room
        - red_no_state
      name: Bathroom
      entity: light.living_room_lamp
      icon: mdi:shower-head
      tap_action:
        action: navigate
        navigation_path: '/ui-lovelace-minimalist/bathroom'
      variables:
        label_use_temperature: false
        label_use_brightness: true
        entity_1:
          entity_id: light.living_room_lamp
          templates:
            - "ulm_custom_actions"
            - "ulm_actions_card"
            - yellow_on
          variables:
            ulm_custom_popup:
              template: "popup_light_brightness"
              entity: light.living_room_lamp
              popup_variables:
                ulm_popup_light_brightness_entity: light.living_room_lamp

frantathefranta avatar Nov 04 '22 19:11 frantathefranta