Need assistance with a helper

Hi all,

I have the following sensor:

It is a rain sensor and it has the attribute precip. It shows in increments if it is going to rain. I would like a helper with shows True when either the first, second or third value is >0, and off otherwise. How would I achieve this?


Photo of a screen? Really?!

It’s not possible for me to work out the data structure from that screenshot. I think you need a template binary sensor (UI, Helpers), with a state template of:

{{ state_attr('sensor.ID','data')['precip'][:3]|sum > 0 }}

but if that doesn’t work (try it in Developer Tools / Template first), try:

{{ state_attr('sensor.ID','precip')[:3]|sum > 0 }}

You’ll have to type the ID. I’m not copying it off that screenshot. Also, it will be on or off, not True or off.

1 Like

Yeah sorry for that poor quality, I have updated it. Going to try your suggestions, thanks.