RESTful Binary Sensor: value_template


I am struggling to implement a RESTful Binary Sensor.

Here is what I’ve got in my configuration.yml:

  - platform: rest
    resource: ""
    method: GET
    name: "z9"
    sensor_class: opening
    value_template: "{{ }}" is either true or false.

Unfortunately I get the following ValueError:

return bool(int(
ValueError: invalid literal for int() with base 10: 'False'

Could someone guide me here?


As far as I remember are binary sensors limited to 0 and 1 as values. Let me have a look for a little enhancement for other useful values.

1 Like

Thank you very much fabaff! This fix works for me.