Google Home device is offline for an API-controlled entity

I have a window opener that is controlled by a local API call to make it open and close.

I added this device as a package in HA which allows it to show up as an entity.

cover:
  - platform: command_line
    covers:
        kitchen_window_opener:
          command_open: curl http://192.168.86.24:8080/position?percent=100
          command_close: curl http://192.168.86.24:8080/position?percent=0
          command_state: curl http://192.168.86.24:8080/settings
          value_template: '{{value_json.position}}'
          friendly_name: Kitchen Window
          unique_id: 06eae6d7-3202-4c54-8a3a-b3f0c5a5be1b

It works perfectly fine as an entity now. However, when using the Nabu Casa integration for Google Home, the device shows up as Offline.

I think it might have something to do with the way the state is set? The window opener reports a position from 0-100 percent using the command_state URL. it returns the following JSON:

{"position":0}

This is why I tried to use the value_template parameter but could be using it wrong.

Any idea what I can do to get it to show online?

Did you ever find a solution to this? I have noticed the same behaviour…