0

I would like to get the current temperature set on heat mode of the Nest thermostat (not the ambient measure temperature).

Is there a way to do that from Google Scripts?

I looked at the Google Apps scripts documentation but found nothing about this.

Rubén
  • 34,714
  • 9
  • 70
  • 166
Permafrost
  • 27
  • 4
  • Have you tried this? https://www.benlcollins.com/apps-script/nest-thermostat/ – FiddlingAway Dec 10 '22 at 11:19
  • I alread have a script that behaves more or less like this, but even in that example, the setpoint temperature is not stored somewhere. – Permafrost Dec 10 '22 at 11:40
  • Just so I'm sure I understand you correctly - you wish to retrieve the current temperature from the thermostat? If so, check the `Step 17` part of the link I posted earlier. To be more specific - lines 74 and 75, which should return temperature in Celsius and Fahrenheit. If you're not after the current temperature, but the one you've set manually, try `alert`ing or otherwise logging all of the properties of the response you get back from the device. – FiddlingAway Dec 10 '22 at 11:50
  • Indeed, I would like to get the temperature I have set manually. Could you please give me more details about alert? Which command would it be? – Permafrost Dec 10 '22 at 12:02
  • 1
    I did it! I used this code (by chance): `var settemp = device['traits']['sdm.devices.traits.ThermostatTemperatureSetpoint']['heatCelsius']; Logger.log('settemp' + settemp);` Thanks for your time! – Permafrost Dec 10 '22 at 12:07

1 Answers1

2

I did it! I used this code (by chance):

var settemp = device['traits']['sdm.devices.traits.ThermostatTemperatureSetpoint']['heatCelsius']; 
Logger.log('settemp' + settemp);
Rubén
  • 34,714
  • 9
  • 70
  • 166
Permafrost
  • 27
  • 4