I would want it to return the sensor data. So here is the real use case.
We have a bluetooth scale that sends my ESP32 weight every time someone uses it. I want to create two different template sensors, one for me and one for my wife. So under 130lbs would report that sensor data to my wife’s sensor and over 200lbs would report to my sensor. It doesn’t necessary need to be a range since our weight difference is substantial.
EDIT: I think it would actually work better as a trigger-based sensor rather than state-based… that gives you the option of using the “for” configuration variable to let the scale reach a steady state, then the value will be set until the next trigger event.
Spitballing here, but this might work for you. You would create two sensors, one for you and one for your wife that both use the same ESP32 device but only change value under certain circumstances:
This makes a lot of sense. There are actually two sensors the scale provides, one is real-time and one is a final value. So your first template works perfectly, since I am using the final value sensor.