Closed jorgwolski closed 7 months ago
Hey there @guillempages, @mib1185, @jpbede, mind taking a look at this issue as it has been labeled with an integration (tankerkoenig
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tankerkoenig documentation tankerkoenig source (message by IssueLinks)
this is not an issue with the tankerkoenig integration. I think your template is just wrong - have a look into the docs
Same template is working flawlessly with an entity from the Pegelonline integration (with geolocation). And until recently that template was working with Tankerkoenig as well.
mhhh ... I've checked the docs again, it is not mentioned that this should work also with sensor entities, but it is also not mentioned to be limited to device tracker and personal entities 🤔 need to check the code how it should work
It seems to work with all entities providing latitude/longitude information.
distance() will measure the distance in kilometers between home, entity, coordinates.
But for some reason, it stopped working for Tankerkoenig entities only, even though they have those attributes.
when you say "it stopped" working, so it was working before? Since the tankerkoenig entities are still shown on the map, they also still have coordinates in an expected format. Is there anything in the full log of homeassistent?
Maybe I found something. I looked those two entities up. The Pegelonline entity's geolocation attributes are formatted like this:
latitude: 52.38806781246802
longitude: 9.676062044544127
The Tankerkoenig ones like this:
latitude: "52.4158"
longitude: "9.678132"
Maybe distance() doesn't like it to be a string.
Edit: Yeah. If I remove the quotation marks in the dev tools, distance() is working
Hey there @guillempages, mind taking a look at this issue as it has been labeled with an integration (tankerkoenig
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
tankerkoenig documentation tankerkoenig source (message by IssueLinks)
The problem
Tankerkoenig entities are showing on the map as expected. But using those to create a distance template just results in
null
.What version of Home Assistant Core has the issue?
core-2024.4.3
What was the last working version of Home Assistant Core?
core-2024.3.x
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tankerkoenig
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tankerkoenig/
Diagnostics information
config_entry-tankerkoenig-cbe826f93ac56c4b37ca046e7ab21c61.json
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response