Number denTemperature { mqtt="<[broker:shellies/<denSensor>/sensor/temperature:state:JS(tempSensor.js)]" }
Number bedroomTemperature { mqtt="<[broker:shellies/<bedroomSensor>/sensor/temperature:state:JS(tempSensor.js)]" }
Is it possible for the script to determine which Item is calling it? I’d like to do something like my pseudo code script.
Alternatively, is it possible to code an argument in the Item definition that gets passed to the script?
Number denTemperature { mqtt="<[broker:shellies/<denSensor>/sensor/temperature:state:JS(tempSensor.js):"DEN"]" }
Number bedroomTemperature { mqtt="<[broker:shellies/<bedroomSensor>/sensor/temperature:state:JS(tempSensor.js):"BEDROOM"]" }
I’ll get there (MQTT2) eventually… maybe kicking & screaming, but I’m sure it’ll be inevitable at some point when MQTT1 begins to feel its unsupported age (hopefully way) down the road
With an offset profile, I can have one profile that can determine which device to apply which specific offset to? Or would I have to define a different profile (with its device specific offset) per Thing?
Then it’s the same as requiring a separate script per Item… and not an improvement on consolidating the logic for a set or “related” Items to a single module to update/maintain. I need the script/profile to act on the received data before the Item is updated. Changing it afterwards requires a proxy/Rule setup, as Rich mentioned.
Ah, I misunderstood from reading. I thought I had to create my own “offset profile”. I missed that the “offset profile” is a built in feature. That fits the bill exactly.