REST Sensor - can I program the returned attributes?

I’d like to have a REST-based sensor in which I loop through the returned JSON response, and programmatically populate 3 attributes, which I wish 3 different sensors could pick each one of them.

Is that somehow doable?

Create your rest sensor and three template sensors that obtain their state from the rest sensor. The template sensors will update as soon as the rest sensor does.

Thanks, I’m trying this out and let’s see how it goes!

I just remembered the new rest integration does allow creating three separate sensors from the one restful resource. So you may not need the template sensors if you do it that way, see the first example in that link.

1 Like

Ahh right. So I can use that new form as specified in the rest integration even if I don’t have access to return attributes, but just work out with parsing a string with a value_template, and then having sensors that further parse that input with value_template too? (I’ll post a new thread on how I made it work)