Bugfix. Default status is not_home, previously assumed to be away.

This commit is contained in:
Jason Williams 2018-08-12 18:30:30 -06:00
parent 3b161a83bc
commit 7d8e77871f
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@
function updateLocation() {
$.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);
map.setCenter(locLive);
})