My domoticz setup is publishing several sensor data with MQTT. If I don’t create a separate floor and room in domoticz for every sensor all data is in one topic (domoticz/out). Every domoticz payload has a unique id (idx) and I managed to create a value_template based on this id:
- platform: mqtt
name: "Woonkamer Temp"
state_topic: "domoticz/out"
unit_of_measurement: '°C'
force_update: false
value_template: "{% if value_json.idx == 6252 %} {{ value_json.svalue1 }} {% endif %}"
Payload:
{ "Battery" : 100, "RSSI" : 7, "description" : "", "dtype" : "Temp + Humidity", "id" : "11022", "idx" : 6252, "name" : "Woonkamer", "nvalue" : 0, "stype" : "Cresta, TFA TS34C", "svalue1" : "24.4", "svalue2" : "53", "svalue3" : "1", "unit" : 1 }
10 other Cresta devices are sending data.
The effect is I don’t get continuous readings. The badges only show the data for a second or so.Tried force_update true and false. Tried expire_after: 30. all without effect.