I have taken a blueprint script to a HUE RW022 remote switch. What I am trying to do is make it work with my Hue Hub and not zha. I am getting an error I am not quite sure of:
Failed to load blueprint: mapping values are not allowed here in “/config/blueprints/automation/GregoryWest501/HueDimmer v2.1h.yaml”, line 56, column 15
This is on the line: event_data:
Any ideas would be helpful.
blueprint:
name: Philips Hue Dimmer V2.1h
description: "Control lights with a Philips Hue Dimmer Switch (v2).\n Blueprint
Version: v2.0.01h"
domain: automation
input:
remote:
name: Philips Hue Dimmer Switch
description: Pick a RWL022 Dimmer Switch
selector:
device:
integration: hue
entity:
- domain:
- sensor
device_class:
- battery
multiple: false
power_light:
name: The main light entity to control.
description: The light entity which the top button will control. (Power button).
selector:
entity:
domain:
- light
multiple: false
hue_light:
name: The secondary light entity to control.
description: The light entity which the bottom button will control. (hue button).
selector:
entity:
domain:
- light
multiple: false
brightness_steps:
name: Percentage to increase or decrease brightness.
description: The Percentagem to increase or decrease brightness when the button
is pressed or hold.
selector:
number:
min: 1.0
max: 25.0
unit_of_measurement: '%'
mode: slider
step: 1.0
# source_url: https://gist.github.com/brodock/0c85f4882b885d4d5499cd88d155c38c#file-huedimmer_rwl022-yaml
mode: restart
max_exceeded: silent
variables:
power_light: !input power_light
hue_light: !input hue_light
brightness_steps: !input brightness_steps
trigger:
- platform: event
event_type: hue_event
event_data:
device_id: !input remote
cluster_id: 64512
action:
- variables:
command: '{{ trigger.event.data.command }}'
power_light_on: '{{ states(power_light) == ''on'' }}'
hue_light_on: '{{ states(hue_light) == ''on'' }}'
- choose:
- conditions: '{{ command == ''on_press'' }}'
sequence:
service: light.toggle
data:
entity_id: !input power_light
transition: 0.5
- conditions: '{{ command == ''off_press'' }}'
sequence:
service: light.toggle
data:
entity_id: !input hue_light
transition: 0.5
- conditions:
- condition: or
conditions:
- '{{ command == ''up_press'' }}'
- '{{ command == ''up_hold'' }}'
sequence:
- choose:
- conditions:
- '{{ power_light_on == false }}'
- '{{ hue_light_on == false }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input power_light
- !input hue_light
transition: 0.5
brightness_pct: '{{ brightness_steps }}'
- conditions:
- '{{ power_light_on == true }}'
- '{{ hue_light_on == true }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input power_light
- !input hue_light
transition: 0.5
brightness_step_pct: '{{ brightness_steps }}'
- conditions:
- '{{ power_light_on == true }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input power_light
transition: 0.5
brightness_step_pct: '{{ brightness_steps }}'
- conditions:
- '{{ hue_light_on == true }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input hue_light
transition: 0.5
brightness_step_pct: '{{ brightness_steps }}'
- conditions:
- condition: or
conditions:
- '{{ command == ''down_press'' }}'
- '{{ command == ''down_hold'' }}'
sequence:
- choose:
- conditions:
- '{{ power_light_on == true }}'
- '{{ hue_light_on == true }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input power_light
- !input hue_light
transition: 0.5
brightness_step_pct: '{{ brightness_steps*-1 }}'
- conditions:
- '{{ power_light_on == true }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input power_light
transition: 0.5
brightness_step_pct: '{{ brightness_steps*-1 }}'
- conditions:
- '{{ hue_light_on == true }}'
sequence:
service: light.turn_on
data:
entity_id:
- !input hue_light
transition: 0.5
brightness_step_pct: '{{ brightness_steps*-1 }}'