blueprint: name: deCONZ - IKEA Tradfri on/off switch + adaptive lighting description: '"Control your deCONZ light(s) with IKEA Tradfri on/off switch ' domain: automation input: remote: name: Remote description: The remote that will control the lights selector: device: integration: deconz manufacturer: IKEA of Sweden model: TRADFRI on/off switch light: name: Light description: The lights that will be controlled selector: entity: domain: light switch: name: Adaptive lighting switch description: Adaptive lighting switch tied to target light entity selector: entity: integration: adaptive_lighting domain: switch mode: restart trigger: - platform: event event_type: deconz_event event_data: device_id: !input 'remote' action: - variables: event: '{{ trigger.event.data.event }}' - choose: - conditions: - '{{ event == 1002 }}' sequence: - service: adaptive_lighting.apply data: entity_id: !input 'switch' lights: !input 'light' turn_on_lights: 'yes' - conditions: - '{{ event == 2002 }}' sequence: - service: light.turn_off entity_id: !input 'light' - conditions: - '{{ event == 1001 }}' sequence: repeat: while: - condition: template value_template: '{{ repeat.index < 10 }}' sequence: - service: light.turn_on entity_id: !input 'light' data: transition: 0.8 brightness_step_pct: 20 - delay: 0.8 - conditions: - '{{ event == 2001 }}' sequence: repeat: while: - condition: template value_template: '{{ repeat.index < 10 }}' sequence: - service: light.turn_on entity_id: !input 'light' data: transition: 0.8 brightness_step_pct: -20 - delay: 0.8 - conditions: - '{{ event == 1003 }}' sequence: - service: light.turn_on entity_id: !input 'light' data: transition: 0 - conditions: - '{{ event == 2003 }}' sequence: - service: light.turn_on entity_id: !input 'light' data: transition: 0