I’m getting some pretty strange behaviour on this card with iOS which I will try to explain as best as I can. If I set the light pop up card with the following code I get the expected behaviour where I can turn on the light with 1 tap and the pop up appears properly with a hold:
entities:
- entities:
- hold_action:
action: call-service
service: browser_mod.popup
service_data:
card:
entity: light.bedroom_light
type: 'custom:light-popup-card'
deviceID:
- this
style:
'--iron-icon-fill-color': '#FFF'
align-items: center
background: 'rgba(0, 0, 0, .8)'
display: block
flex-direction: column
height: 100%
justify-content: center
left: 0
margin: 0
position: fixed
top: 0
width: 100%
z-index: 999
title: Bedroom Light
entity: light.bedroom_light
name: Bedroom
title: Lights
statePositionTop: true
type: 'custom:homekit-card'
Strangely, If I change hold_action to double_tap_action then the pop-up card will appear one a single tap. If I double tap quickly it will simply open the popup card and quickly close it. If I try to define tap_action to toggle the light entity it will still just open the popup card and ignore the tap_action. I can set the hold_action to toggle the light on/off.
If I write the code as follows the hold action will bring up the custom light-popup-card, but the percentage or “off” text will have the iOS text selection as I mentioned earlier, but the double tap action will work properly and bring up the default more-info light entity popup.
entities:
- entities:
- entity: light.bedroom_light
name: Bedroom
double_tap_action:
action: more-info
entity: light.bedroom_light
popup:
type: 'custom:light-popup-card'
title: Lights
statePositionTop: true
type: 'custom:homekit-card'
If I leave the code like that, but add the following code to my main Lovelace code via the Raw config editor then suddenly the single tap action opens the popup card defined under popup_cards again. If I perform a hold action it will open the popup card with the brightness or “off” selected in text.
popup_cards:
light.bedroom_light:
card:
entity: light.bedroom_light
type: 'custom:light-popup-card'
style:
'--iron-icon-fill-color': '#FFF'
align-items: center
background: 'rgba(0, 0, 0, 0.8)'
display: block
flex-direction: column
height: 100%
justify-content: center
left: 0
margin: 0
position: fixed
top: 0
width: 100%
z-index: 999
title: Bedroom Light
Please note that this behaviour is only evident on iOS, in Safari if I double click the mouse it will bring up the custom light-popup-card and a single click will toggle the light on or off.
Note this behaviour is still evident if I change the popup_cards code to the following, but now it obviously shows the entities card on single tap instead of double tap which it should.
popup_cards:
light.bedroom_light:
card:
type: entities
entities:
- entity: light.kids_room_light
title: Bedroom Light
I have been live troubleshooting while doing this post and just now decided to try the browser-mod popup service on a button-entity card and even with this card the double_tap_action brings up the popup-card on a single tap instead of double tap, so seems like an issue with browser mod.