Bugfix. Default status is not_home, previously assumed to be away.
This commit is contained in:
parent
3b161a83bc
commit
7d8e77871f
@ -61,7 +61,7 @@
|
|||||||
|
|
||||||
function updateLocation() {
|
function updateLocation() {
|
||||||
$.getJSON('?data', function(data) {
|
$.getJSON('?data', function(data) {
|
||||||
$('h1').html((data.state == 'away') ? 'Nobody Knows' : 'At ' + data.state.replace(/^\w/, c => c.toUpperCase()));
|
$('h1').html((data.state == 'not_home') ? 'Nobody Knows' : 'At ' + data.state.replace(/^\w/, c => c.toUpperCase()));
|
||||||
var locLive = new google.maps.LatLng(data.attributes.latitude, data.attributes.longitude);
|
var locLive = new google.maps.LatLng(data.attributes.latitude, data.attributes.longitude);
|
||||||
map.setCenter(locLive);
|
map.setCenter(locLive);
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user