Hi there what would be the best way to achieve working termostat target temp value transformation.
Tuya thermostat hs 2 channels:
Current temp - values temp_current(5 - 500℃) which need to be divided by 10 to achieve proper reading.
I did it in links/Termostat_Salon_Temp_Current/temp_current using profile “Divide” from smarthome/j addon. It’s working ok
but in case of Target temperature i need to multiply the value from item by 10 and send it to the channel not sure how to achieve it
jimtng
(jimtng)
October 3, 2025, 5:07am
2
use uom! if your values need to be divided by 10 to give you a celsius value, it means that they are in deci celsius. Just mark the channel with deci celsius unit, and your item as celsius.
it depends right now i have a different tuya thermostat which send values multiplied by “2”. I need to divide by 2 when receving but multiply by 2 when sending new temp set
jimtng
(jimtng)
October 5, 2025, 2:01pm
4
If you have a “divide” profile, then just divide by 0.5 to multiply by 2.
jimtng
(jimtng)
October 5, 2025, 2:04pm
5
or you can use script profile, e.g.
DSL: |Float.parseFloat(input) * 2
JS: |parseFloat(input) * 2
RB: |input.to_f * 2
yeah but i was wondering if this could be done on one item depending if
a) value received from external (tuya binding) → divide by 2
b) value received from openhab item → multiply by 2 and send to the channel
For now i will make a technical item to multiply and send to the channel
jimtng
(jimtng)
October 5, 2025, 2:38pm
7
system
(system)
Closed
November 16, 2025, 6:39am
8
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.