Closed madpsintst closed 4 years ago
Have made initial minor changes to save correct value to device attributes/ update user interface - let me know if that sorts it.
The temperature scale setting is now being saved at https://red.cb-net.co.uk/devices; however, Alexa is converting the temperature back to Celsius before reading it back. For example, my pool is currently 85 degree Fahrenheit. When I ask Alexa to read the temperature, she says "The pool water is 29.4 degrees".
Can you confirm that the Amazon Echo device itself is set to use Fahrenheit: https://alexafaq.com/guide-how-to-change-temperature-units-to-fahrenheit-or-celsius/
Have reviewed the code and confirmed that ( with the correct spelling :/ ) the state will be sent back with the stored scale value, so this should now work. If you still have issues it may be worth deleting the existing device and creating a new one (with the same name, if so desired).
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": deviceJSON.state.temperature,
"scale": deviceJSON.attributes.temperatureScale.toUpperCase()
},
"timeOfSample": deviceJSON.state.time,
"uncertaintyInMilliseconds": 1000
Ah yes...the echo device was set to Celsius, hence the conversion. All is working well now. Many thanks!
The Fahrenheit scale option value is not retained in temperature sensor devices. Attempts to have Alexa interact with temperature sensor devices that use the Fahrenheit scale produce "Doesn't support that" response from Alexa.
To reproduce:
Temporary workaround: use Celsius