Hello everyone,
I've recently been attempting to perform mathematical operations on a variable in my Home Assistant setup. The variable I'm working with is obtained from Home Assistant and is named comfort_temperature
. Here's an example of what I'm doing and the unexpected results I'm getting:
var comfort_temperature = global.get('homeassistant.homeAssistant.states["input_number.bedroom_1_comfort_temperature"].state')
- node.status({fill: 'green', shape: 'dot', text: "Temp: " + comfort_temperature + 2 }) Result: 16.02
- node.status({fill: 'green', shape: 'dot', text: "Temp: " + comfort_temperature / 2 }) Result: 8
- node.status({fill: 'green', shape: 'dot', text: "Temp: " + comfort_temperature * 2 }) Result: 32
I'm puzzled by these unexpected results and would appreciate any insights or assistance in understanding what's happening.
Thanks
Kalvin