I found that i can set the temperature measurement to an external sensor for the Bosch Thermostat 2, by writing a signed 16 bit integer to 0x4040. I was also able to expose this to the REST API by adding
{
"name": "config/externalsensortemp",
"refresh.interval": 360,
"read": {
"at": "0x4040",
"cl": "0x0201",
"ep": 1,
"fn": "zcl:attr",
"mf": "0x1209"
},
"parse": {
"at": "0x4040",
"cl": "0x0201",
"ep": 1,
"eval": "Item.val = Attr.val;",
"fn": "zcl:attr",
"mf": "0x1209"
},
"write": {
"at": "0x4040",
"cl": "0x0201",
"dt": "0x29",
"ep": 1,
"eval": "Item.val = Attr.val;",
"fn": "zcl:attr",
"mf": "0x1209"
},
"default": 0
},
to the ddf file.
What would be a valid way to get the temperature reading of my Aquara Zigbee Thermometer to be written to this 0x4040.
I thought about adding a REST API rule, which triggers as soon as the sensor detects a change. But I do not know how to write a dynamic parameter as rule action. Is this possible?
Is there any other way how one can bind the int16 result of one sensor to a writeable property of another sensor?
Best, Florian