Hi all,
I’ve tried everything to trouble shoot this error I’m getting. What I’m trying to do is:
case: motion is not detected for 30 seconds,
if: lounge relax scene is activated, revert the hall light to the relax scene
if: lounge relax scene is not activated, turn off the hall light
- alias: Turn off hall light when no motion detected
id: '1576902140932'
description: ''
trigger:
- device_id: d65097be65e741a5b9b0b13ee1f5c561
domain: binary_sensor
entity_id: binary_sensor.hall_motion_sensor
for:
hours: 0
minutes: 0
seconds: 30
platform: device
type: no_motion
condition:
- condition: state
entity_id: light.hall_light
state: 'on'
action:
- service_template: >
{% if is_state('input_boolean.lounge_relax_activated', 'on') %}
script.relax_on
{% else %}
script.relax_off
{% endif %}
scripts.yaml:
- relax_on:
sequence:
- service: scene.turn_on
data:
entity_id: scene.relax
- relax_off:
sequence:
- service: light.turn_off
data:
entity_id: light.hall_light
Upon checking validation, I get the following error:
Invalid config for [script]: expected dictionary for dictionary value @ data[‘script’]. Got [OrderedDict([(‘relax_on’, OrderedDict([(‘sequence’, [OrderedDict([(‘service’, ‘scene.turn_on’), (‘data’, OrderedDict([(‘entity_id’, ‘scene.relax’)]))])])]))]), OrderedDict([(‘relax_off’, OrderedDict([(‘sequence’, [OrderedDict([(‘service’, ‘light.turn_off’), (‘data’, OrderedDict([(‘entity_id’, ‘light.hall_light’)]))])])]))])]. (See /config/configuration.yaml, line 20). Please check the docs at https://home-assistant.io/integrations/script/
Any ideas what’s wrong here?