But I wonder: how can modify the value_template parameter in configuration.yaml, so to use the key “contatto-2” (this is the friendly name of the sensor, in tasmota), instead of the 0xB396 key?
value_json[“ZbReceived”] should return a dict of entries (or something like it). I could iterate this dict and then find the entry with “Name” == “contatto-2”.
But I don’t know the syntax to implement it in the value_template
I agree. But at this point I don’t understand if this is a Tasmota issue, given that the short name (0xB396) is randomly assigned to the device by tasmota. In this way, it would be clumsy to map the tasmota’s devices in the yaml file, especially if for some reason the short name randomly changes when I re-pair the same sensor. Any help/idea of how to solve this is greatly appreciated.
But the random ID is still a substring of the mqtt msg. Then the Rube Goldberg would be necessary. (I cross-posted this to the Tasmota forum, meanwhile)