Open erkr opened 1 month ago
Cannot reproduce with a bit different code:
type: entities
entities:
- input_boolean.test_boolean
- type: custom:template-entity-row
entity: sun.sun
hold_action: >-
{% set ip = 'google.com' -%}
{%- if is_state('input_boolean.test_boolean','on') -%}
{ "action": "url", "url_path": "http://{{ip}}" }
{%- else -%}
{ "action": "more-info" }
{%- endif %}
@ildar170975 thanks for verifying! Can you please tell on which platform/browsers/mobile app you tested?!
So it is browser specific. I now verified myself on some platforms:
Working:
Not working:
Best Eric
I tested in Chrome & Win. Have iOS companion app (iOS 15.x), but have not tested there. Will try to do it a bit later.
Have iOS companion app (iOS 15.x), but have not tested there. Will try to do it a bit later.
Any update on this 😉
Sorry for a delay, iPad Air 2 with iOS 15.x simply does not show dashboards with 2024.5 )))) That is why I am a bit stuck here )))
Too bad, sorry to hear that. Thanks for replying
Managed to get iPad to work, hold on...
iPad Air 2, iOS 15.x:
type: entities
entities:
- input_boolean.test_boolean
- type: custom:template-entity-row
entity: sun.sun
hold_action: >-
{% set ip = 'google.com' -%}
{%- if is_state('input_boolean.test_boolean','on') -%}
{ "action": "url", "url_path": "http://{{ip}}" }
{%- else -%}
{ "action": "more-info" }
{%- endif %}
If condition is TRUE or FALSE - hold_action does nothing. So, the issue is confirmed.
@ildar170975 Thanks!!!
Thanks for the great card. I use it a lot. Today I ran into an issue. When I template the Hold_action it doesn’t work, but same template in tap_action works fine!! Noticed this on my iPhone using the iOS companion app, that is configured to use safari (will report back for other browsers):
The example that works fine with tap_action but fails using hold_action (this is intended to be used with Nmap device trackers):