Delay_off gives eror in binary sensor template

I have a binary sensor that combines input form two MQTT sensors and returns ‘on’ when either one is triggered. I want to add an delay_off, but this give me an error when checking the config and reloading.

commenting out the delay_off statement fixes the issue.

This is the relevant part of the configuration file:

binary_sensor
  - platform: template 
    sensors: 
      woonkamer_movement: 
        friendly_name: "woonkamer beweging" 
        delay_off: 
          minutes: 5 
        entity_id: 
          -  binary_sensor.woonkamer_beweging_microwave
          -  binary_sensor.woonkamer_beweging_pir
        device_class: motion  
        value_template: >- 
          {{ is_state('binary_sensor.woonkamer_beweging_pir', 'on') or 
          is_state('binary_sensor.woonkamer_beweging_microwave', 'on') 
          }}        

here is the message from the log file

2017-12-10 11:16:03 ERROR (MainThread) [homeassistant.config] Invalid config for [binary_sensor.template]: [delay_off] is an invalid option for [binary_sensor.template]. Check: binary_sensor.template->sensors->woonkamer_movement->delay_off. (See ?, line ?). Please check the docs at https://home-assistant.io/components/binary_sensor.template/

and this is the check_config error i get

Failed config
  binary_sensor.template: 
    platform: template
    sensors: [source /home/homeassistant/.homeassistant/configuration.yaml:134]
      woonkamer_movement: [source /home/homeassistant/.homeassistant/configuration.yaml:135]
        delay_off: [source /home/homeassistant/.homeassistant/configuration.yaml:137]
          minutes: 5
        device_class: motion
        entity_id: [source /home/homeassistant/.homeassistant/configuration.yaml:139]
          - binary_sensor.woonkamer_beweging_microwave
          - binary_sensor.woonkamer_beweging_pir
        friendly_name: woonkamer beweging
        value_template: {{ is_state('binary_sensor.woonkamer_beweging_pir', 'on') or  is_state('binary_sensor.woonkamer_beweging_microwave', 'on')  }}                  

Successful config (partial)
  binary_sensor.template:

please help me to formulate the delay_off correctly

Maybe try it with just the value template :-

binary_sensor
  - platform: template 
    sensors: 
      woonkamer_movement: 
        friendly_name: "woonkamer beweging" 
        delay_off: 
          minutes: 5 
        value_template: >-
          {{ is_state('binary_sensor.woonkamer_beweging_pir', 'on') or 
          is_state('binary_sensor.woonkamer_beweging_microwave', 'on') 
          }}

ok, I just gave that a try and unfortunately it does not work.

even tried with only the simplest value template but no dice there either;

the relevant code:

binary_sensor:
  - platform: mqtt
    name: woonkamer beweging pir
    state_topic: "home/woonkamer/boekenkast/sensor/pir"
  - platform: template 
    sensors: 
      woonkamer_movement: 
        delay_off: 
          minutes: 5 
        value_template: >- 
          {{ is_state('binary_sensor.woonkamer_beweging_pir', 'on') }}   

Error message:

2017-12-11 17:23:00 ERROR (MainThread) [homeassistant.config] Invalid config for [binary_sensor.template]: [delay_off] is an invalid option for [binary_sensor.template]. Check: binary_sensor.template->sensors->woonkamer_movement->delay_off. (See ?, line ?). Please check the docs at https://home-assistant.io/components/binary_sensor.template/

I tried it with delay_off: ‘00:00:05’ in one of my sensors and came up with the same thing, it just doesn’t work :frowning:

Different error tho’
in “/home/pi/.homeassistant/binary_sensors.yaml”, line 5, column 7
expected , but found ‘’
in “/home/pi/.homeassistant/binary_sensors.yaml”, line 6, column 9

OK, tried it like yours and it went thru’ no problem…

- platform: template
  sensors:
    kitchen_miners9:
      friendly_name: "Kitchen MinerS9"
      delay_off:
        minutes: 5
      value_template: >-
        {{ states('sensor.kitchenantminers9power')|float < 900.00 }}

From states table…