Error with interpreting the state of a command line cover

I have a command line cover defined as shown below:


cover:
  platform: command_line
  covers:
      velux_blind:
        command_close: "curl --retry 3 http://192.168.1.186/blind/down/"
        command_open: "curl --retry 3  http://192.168.1.186/blind/up/"
        command_state: curl --retry 3  http://192.168.1.186/blind/ststus/"    
        friendly_name: Velux Blind
        command_timeout: 120
        value_template: ‘{{ 0 }}’

When calling this blind from Google Home, two things happen:

  1. The action completes successfully
  2. Having completed successfully, google announces “sorry, that mode is not available for velux blind”

Checking the HA logs, I see the failure seems to be when calling command_state, with this in the logs:

ValueError: invalid literal for int() with base 10: '‘0’'

The command in question returns the character 0 or 1 when called

Any idea how I can get around this…?

Those quotes look wrong, was it a copy-paste from a website by chance? See if this changes anything:

value_template: "{{ 0 }}"

Also, is the command state really supposed to be ststus and not status?

1 Like

Same Problem for me. Can’t figure out how to get the Status of the Cover via conmand line.

Sorry for the delay in replying!

The value_template change didn’t seem to affect the error received
However, on investigation the value_template was not needed at all

Removing it entirely, and merely leaving the command_open, command_close, and command_status (yes, that was a typo in the opriginal post!) and all seems to work fine, including status!