Value Template slow to update?

I’m using the rest sensor to alert me when a friend is playing chess online. The 60s update seems to work great, but the value template/sensor value is updated significantly slower than the attribute that it’s monitoring. Is this normal? How can I speed it up?

rest:
  - scan_interval: 60
    resource: https://lichess.org/api/users/status?ids=myfriend123
    sensor:
      - name: "myfriend123 Lichess"
        json_attributes_path: "$.[0]."
        value_template: >
          {% if state_attr("sensor.myfriend123_lichess", "playing") == true %}
            Playing
          {% else %}
            Not Playing
          {% endif %}
        json_attributes:
          - "name"
          - "patron"
          - "id"
          - "online"
          - "playing"
          - "streaming"

You’re templating the value based on the current value from the sensor, rather than the REST response. On the assumption that when it performs the REST call it sets the value and then the attributes, then reading the “current” value of an attribute will actually be the previous value, since it hasn’t been set yet. Instead you should be able to use the following to read the attribute from the REST response (assuming I’m understanding the data you’re receiving):

value_json[0].playing

Whoops, didn’t realize that was the order of operations. That fixed it! Thank you!