Here you can see how the topic Event has been set up with the device topic and the correct script. Topic Event Topic: shellies/shellydw2-/sensor/battery Script: return payload;