Google Maps Integration

So I wanted to see if I could intigrate Google Maps as a replacement for the built in Maps feature.
I was looking for something a little more robust than the built in map, and while the static map cards are cool, they dont offer any of the features the Full Maps api does.
Yes, I do need an API key for this, but I figure 20k requests per day on the free setup is more than enough.

This is basically a simple .html file sitting in the www folder.
Im using the iframe function and pointing to

So he is the rub. I need to be able to pull the information from device tracking for the locations into this HTML, which Im pretty sure is not possible with this method, as the variables below dont actually get anything from HA.

{{ states.device_tracker.myphone.attributes.longitude }}
{{ states.device_tracker.myphone.attributes.latitude }}

Any ideas on getting this to work, or maybe another method to look at?

Here is the simple html file.

<!DOCTYPE html>
<title>HTML Iframes</title>
<body> {
	margin: 0;
<iframe src="//{{ states.device_tracker.billphone_bill_phone.attributes.latitude }}%2C{{ states.device_tracker.billphone_bill_phone.attributes.longitude }}
    &key=MYAPIKEY" allowfullscreen style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">


{{ states.device_tracker.myphone.attributes.longitude }}

Crap sorry forgot to add attributes in the text above.
It is already present in html file though.

Can an HTML file hosted in the /www/ directory interpret these HA variables?

Probably have to do an API call to your HA instance from the html/js page when it loads and/or on an interval.

$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
       -H "Content-Type: application/json" \

check here for more details:

quick and dirty and not tested… but try this:

function getLocation() {

	  "url": '',
	  "type": 'post',
	  "contentType": 'application/json',
	  "dataType": 'json',
	  "data": '',
	  "success": function (resp) {
		  //// take response and update google URL
		  return resp;
	  "error": function (XMLHttpRequest, textStatus, errorThrown) {
		  alert('something went wrong');

add that to the onload and update the success logic and you’re on your way…