We’d appreciate any help we can get with problems we’re having running the tests in the Test Suite, controlling a thermostat. The test suite fails, but it’s not clear from the error it gives what the problem is, if we call our API ourselves then it looks to be fine.
In the test ‘Set the Thermostat to 20 degrees’ it fails and gives this output:
Expected state to include {“thermostatTemperatureSetpoint”:{“xRange”:[19,21]}}, actual state: {“online”:true, “thermostatMode”:”heat”,”ThermostatTemperatureSetpoint”:15,”thermostatTemperatureAmbient”:19.5}: expected false to be true
If I post this to our API endpoint, the same one that the test suite is using:
{“requestId”:”c3085ea8-a42b-443f-8cbf-823808a8c8a4″,”inputs”:[{“intent”:”action.devices.EXECUTE”,”payload”:{“commands”:[{“devices”:[{“id”:”2″,”customData”:{}}],”execution”:[{“command”:”action.devices.commands.ThermostatTemperatureSetpoint”,”params”:{“thermostatTemperatureSetpoint”:”20″}}]}]}}]}
This is what it gets back: {“requestId”:”c3085ea8-a42b-443f-8cbf-823808a8c8a4″,”payload”:{“commands”:[{“ids”:[“2″],”status”:”SUCCESS”,”states”:{“thermostatMode”:”heat”,”thermostatTemperatureSetpoint”:20.0,”thermostatTemperatureAmbient”:24.5}}]}}
which looks to be correct.
I’ve tried calling the API myself using the same payload as I think the test will be using, but I can’t reproduce the problem the test seems to have.
Cloud Schneider is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.