Hi! I’m having trouble setting Aqara’s rotation to control brightness of the lights.
What I want to do is to send degree value from rotation event (or even state, as rotational value has it’s own sensor) to brightness_step
but I can’t make it work.
I tried these approaches:
- id: '1585765356304'
alias: MCube2 Rotate
description: ''
trigger:
- platform: event
event_type: cube_action
event_data:
entity_id: sensor.lumi_lumi_sensor_cube_4c14a702_multistate_input
action_type: rotate
condition: []
action:
- data:
brightness_step: {{states.sensor.lumi_lumi_sensor_cube_4c14a702_analog_input}}
entity_id: light.pc_table_1
service: light.turn_on
and
- id: '1585765356304'
alias: MCube2 Rotate
description: ''
trigger:
- entity_id: sensor.lumi_lumi_sensor_cube_4c14a702_analog_input
platform: state
condition: []
action:
- data:
brightness_step: {{states.sensor.lumi_lumi_sensor_cube_4c14a702_analog_input.state}}
entity_id: light.pc_table_1
service: light.turn_on
But both give
Error loading /config/configuration.yaml: invalid key: "OrderedDict([('states.sensor.lumi_lumi_sensor_cube_4c14a702_analog_input', None)])"
in "/config/automations.yaml", line 581, column 0
Error when reloading automations
I’m connecting it through ZHA, can’t find how to make this automation work yet