WouterEekhout / MMM-Tado

A MagicMirror Module for your Tado Smart Thermostat.
MIT License
7 stars 6 forks source link

Error - when heating manually turned off #5

Closed dinkybluebug closed 7 years ago

dinkybluebug commented 7 years ago

Hi - me again (sorry). Still figured you would want want issues and bugs logged - so here goes.

Noticed the module errors when the heating manually turned off.

error in console is :

Uncaught TypeError: Cannot read property 'celsius' of null at MMM-Tado.js:149 at u (lodash.min.js:1) at Function.gf (lodash.min.js:2) at MMM-Tado.js:77 at u (lodash.min.js:1) at Function.gf (lodash.min.js:2) at Class.getDom (MMM-Tado.js:61) at updateDom (main.js:99) at Object.updateDom (main.js:472) at Class.updateDom (module.js:296)

output of api is:

{ "tadoMode": "HOME", "geolocationOverride": false, "geolocationOverrideDisableTime": null, "preparation": null, "setting": { "type": "HEATING", "power": "OFF", "temperature": null }, "overlayType": "MANUAL", "overlay": { "type": "MANUAL", "setting": { "type": "HEATING", "power": "OFF", "temperature": null }, "termination": { "type": "MANUAL", "projectedExpiry": null } }, "link": { "state": "ONLINE" }, "activityDataPoints": { "heatingPower": { "type": "PERCENTAGE", "percentage": 0, "timestamp": "2017-01-15T12:54:54.476Z" } }, "sensorDataPoints": { "insideTemperature": { "celsius": 21.47, "fahrenheit": 70.65, "timestamp": "2017-01-15T12:54:50.882Z", "type": "TEMPERATURE", "precision": { "celsius": 0.1, "fahrenheit": 0.1 } }, "humidity": { "type": "PERCENTAGE", "percentage": 42.4, "timestamp": "2017-01-15T12:54:50.882Z" } } }

WouterEekhout commented 7 years ago

Hi! No worries! I appreciate your time and effort you take in contacting me. It really helps! I'm still building my mirror, so I didn't spot all these flaws. I will create a fix for it.

WouterEekhout commented 7 years ago

Hi! an fix has been created. Thanks again for your time to report this problem.

dinkybluebug commented 7 years ago

Awesome - works great. Thanks.