Value_json' is undefined when rendering

Hi,

So, i have a Shelly1 set up to use as a smart doorbell.
I had a Rest switch set up to define the state of the doorbell.
When i close the door from my daughters bedroom the doorbell should turn off.

 - platform: rest
    name: shelly_doorbell_chime_status
    resource: http://192.168.2.44/settings/relay/0
    body_on: 'btn_type=toggle'
    body_off: 'btn_type=detached'
    is_on_template: '{{ value_json.btn_type == "toggle" }}'
    username: !secret my_username
    password: !secret my_password

Suddenly i got this error in my logs:

2021-11-11 13:17:11 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.btn_type == "toggle" }}'

2021-11-11 13:17:11 ERROR (MainThread) [homeassistant.components.rest.switch] Got non-ok response from resource: 401

For whatever reason, your username/password is not accepted anymore.