Unable to toggle RESTful Switch

I am trying to add a RESTful Switch.
I have succeeded to get the switch to mirror the state of the web resource, but every time I try to change using HA it throws a message in the log: “Can’t turn on Is resource/endpoint offline?”

I thought that “well I just have to enable logging to see what went wrong” but unfortunately no other messages appear…

This is what I got:

  - platform: rest
    name: "Vacuum manual control switch"
    method: put
    verify_ssl: false
    body_on: '{"action": "enable"}'
    body_off: '{"action": "disable"}'
    is_on_template: "{{ value_json.enabled }}"

When using Postman (or a web browser) a GET request to the endpoint gives the output:

    "enabled": false

I can send a valid PUT request to the endpoint using Postman and get an “OK” (with status 200) back when the following body is attached:

  "action": "disable"

This is a Valetudo vacuum.