Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105498

Problems with a template not providing expected results in Lovelace card

$
0
0

@brucek1642 wrote:

I am trying to use a template in button card but not getting the expected results. I think it is because the the result of the template is not a proper string.

This is how I want the results to end up

tap_action:
  action: url
  url_path: 'http://172.16.0.176'

Except that I want the url entry to come from a template. These are the three versions I have tried in the developer template tool and they all seem to work fine there, but not as the url_path in button card.

{{ "http://"~state_attr('sensor.tuyad7_status', 'IPAddress')}}

{{'http://'}}{{state_attr('sensor.tuyad7_status', 'IPAddress')}}

http://{{ state_attr('sensor.tuyad7_status', 'IPAddress') }}

Any ideas ?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 105498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>