UI
UI copied to clipboard
room-card unable to show popup with browser mod
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
it's not working for me neither. i've the same need.
any news on this problem?
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; ]]]"
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.
Should be possible now with the custom_popups feature.
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