0

I have a device as "Heater" to support the utterance "what is the temperature in the room?", and my instance returns following JSON object of device status to Home Service: {'devices': {'': {'online': True, 'on': True, 'thermostatTemperatureSetpoint': 21, 'thermostatTemperatureAmbient': 29, 'currentModeSettings': {'mode': 'Heating'}, 'currentFanSpeedSetting': 'L1'}}}

But Google always returns " is off and it's curretnly 29 degrees". Does anyone know why Google thinks device is off?

Fei Deng
  • 3
  • 1

1 Answers1

0

It looks like your device is generally implementing the TemperatureSetting trait, but your device state seems to use currentModeSettings rather than the expected activeThermostatMode for the current mode. As such, the activeThermostatMode is going to use a default value.

Nick Felker
  • 11,536
  • 1
  • 21
  • 35
  • The "currentModeSettings" is used for other features, and I have added both "thermostatMode" and "activeThermostatMod" which is optional, the result is still same with following object: {'devices': { : {'online': True, 'on': True, 'thermostatTemperatureSetpoint': 21, 'thermostatTemperatureAmbient': 28, 'thermostatMode': 'heat', 'activeThermostatMode': 'heat', 'currentModeSettings': {'mode': 'Heating'}, 'currentFanSpeedSetting': 'L1'}}} – Fei Deng Jul 24 '20 at 18:07
  • Have you resynced your devices? Can you try this without the Modes trait at all for the moment? – Nick Felker Jul 24 '20 at 18:54
  • Yes, I unlink then link my account before the test, and Modes is a required feature for my project, do you think Home Service confused itself by "currentModeSettings"? – Fei Deng Jul 24 '20 at 19:42
  • Yes there can be some odd behavior with thermostats and the Modes trait. Can you use TemperatureControl rather than TemperatureSetting? – Nick Felker Jul 24 '20 at 19:47
  • Unfortunately my device is Heater which should use "TemperatureSetting" – Fei Deng Jul 24 '20 at 19:50
  • Tested with your suggestion and it works now, it seems Home Service expects the response object only contains the supported attributes by that command, thanks a lot for your help. – Fei Deng Jul 25 '20 at 00:01