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