Because the RESTful Sensor only allows top-level keys to be called out under json_attributes. So, in your case, that would be temperature. You might want to do this instead:
sensor:
- platform: rest
name: Pool Temperature
json_attributes:
- temperature
resource: http://192.168.2.124:3000/temperature
value_template: '{{ value_json.temperature.poolTemp }}'
Thanks, that worked. I assume there is, but is there any rhyme or reason as to the placement of the parenthesis? Never would have figured that one out.
The state_attr function takes two parameters - the first is the entity_id, and the second is the name of the attribute. I wasn’t sure if the latter would accept an expression (my first suggestion) or just the name of an attribute (the one that worked.) Once state_attr returns the attribute you can use it “normally”. Since this particular attribute has “attributes” itself, I then accessed poolTemp by using the dot operator. Generally I recommend using the state_attr function, but in this case it could also reasonably be written this way: