Skip to content

Commit

Permalink
Read weather data from advcasio.data.json, not weather.json
Browse files Browse the repository at this point in the history
  • Loading branch information
warmenhoven committed Apr 13, 2024
1 parent 02455c8 commit 7a3c528
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/advcasio/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@ function drawRocket() {

function getTemperature(){
try {
/*
var temperature = E.getTemperature()
var formatted = require("locale").temp(temperature).replace(/[^\d-]/g, '');
return formatted;
*/
var weatherJson = storage.readJSON('advcasio.data.json');
var weather = weatherJson.weather;
return Math.round(weather.temp-273.15);

} catch(ex) {
print(ex)
Expand Down

0 comments on commit 7a3c528

Please sign in to comment.