example.js
function() {
            return fritz.getDevice(thermostat).then(function(device) {
              console.log("[" + thermostat + "] " + device.name);
            });       
          }
function() {
            return fritz.getDevice(thermostat).then(function(device) {
              console.log("[" + thermostat + "] " + device.name);
            });       
          }
function ( ) { return fritz . getDevice ( thermostat ) . then ( function ( device ) { console . log ( "[" + thermostat + "] " + device . name ) ; } ) ; }
there is no native getThermostatName function- use getDevice instead
there is no native getThermostatName function - use getDevice instead