Hello! I would like to get some help
I’m sorry, could you explain where should I put this?: (When I try to the entities card: I can’t save it. Or this one is goes too in the configuration.yaml?)
alias: ble dimmer automation
description: ""
trigger:
- platform: state
entity_id:
- sensor.ble_dimmer_dimmer_yeelight
attribute: last_packet_id
condition: []
action:
- choose:
- conditions:
- condition: state
entity_id: sensor.ble_dimmer_dimmer_yeelight
attribute: last_type_of_press
state: short press
sequence:
- service: light.toggle
data: {}
target:
entity_id: light.yeelink_ceiling5_41d0_light
- conditions:
- condition: state
entity_id: sensor.ble_dimmer_dimmer_yeelight
attribute: last_type_of_press
state: rotate right
sequence:
- service: light.turn_on
data:
brightness_step_pct: >-
{{ state_attr('sensor.ble_dimmer_dimmer_yeelight',
'dimmer_value') | int*5 }}
target:
entity_id: light.yeelink_ceiling5_41d0_light
- conditions:
- condition: state
entity_id: sensor.ble_dimmer_dimmer_yeelight
attribute: last_type_of_press
state: rotate left
sequence:
- service: light.turn_on
data:
brightness_step_pct: >-
{{ state_attr('sensor.ble_dimmer_dimmer_yeelight',
'dimmer_value') | int*-5 }}
target:
entity_id: light.yeelink_ceiling5_41d0_light
mode: single
I changed the entity names for my setup.