Hello
I have created a sensor to retrieve the information of an API with the platform rest and resource_template.
If the resource template is harcoded, it works well and I get the information I need
resource_template: "https://api.meteo-concept.com/api/location/city?token=myToken&latlng=xx.xxxxx,yy.yyyyy"
If the resource template uses the longitude and latitude as a parameter of my phone, the URL is not well evaluated. Here is an example :
resource_template: "https://api.meteo-concept.com/api/location/city?token=myToken&latlng={{ state_attr('myPhone', 'latitude')}},{{ state_attr('myPhone, 'longitude')}}"
In the Debug I have this :
resource_template: "https://api.meteo-concept.com/api/location/city?token=myToken&latlng=none,none"
It looks as if the URL was not well evaluated before being sent to the API.
I may have found other posts with the same issue but still unsolved.
Do you know how to solve this issue ?
Thanks to all for your help.
Regards