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