This is a fork of the deCONZ - IKEA five button remote for lights and this ZHA - IKEA five button remote for lights
However for the 2 button Tradfri ON/OFF Switch IKEA Tradfri ON/OFF Switch (E1743) Zigbee compatibility
UI View:
blueprint:
name: deCONZ - IKEA two button remote for lights
description: 'Control lights with an IKEA five button remote (the sqaure ones).
Short press on the on button to the last set brightness (unless the force brightness in the blueprint).
Dim up/down buttons will change the brightness smoothly and can be pressed and hold until the brightness is satisfactory.
'
domain: automation
input:
remote:
name: Remote
description: IKEA remote to use
selector:
device:
integration: deconz
manufacturer: IKEA of Sweden
model: TRADFRI on/off switch
light:
name: Light(s)
description: The light(s) to control
selector:
target:
entity:
domain: light
force_brightness:
name: Force turn on brightness
description:
'Force the brightness to the set level below, when the "on" button
on the remote is pushed and lights turn on.
'
default: false
selector:
boolean: {}
brightness:
name: Brightness
description: Brightness of the light(s) when turning on
default: 50
selector:
number:
min: 0.0
max: 100.0
mode: slider
step: 1.0
unit_of_measurement: "%"
mode: restart
max_exceeded: silent
variables:
force_brightness: !input "force_brightness"
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:
- choose:
- conditions: "{{ force_brightness }}"
sequence:
- service: light.toggle
target: !input "light"
data:
transition: 1
brightness_pct: !input "brightness"
default:
- service: light.turn_on
target: !input "light"
data:
transition: 1
- conditions:
- "{{ event == 2002 }}"
sequence:
- service: light.turn_off
target: !input "light"
data:
transition: 1
- conditions:
- "{{ event == 1001 }}"
sequence:
- repeat:
count: 10
sequence:
- service: light.turn_on
target: !input "light"
data:
brightness_step_pct: 10
transition: 1
- delay: 1
- conditions:
- "{{ event == 2001 }}"
sequence:
- repeat:
count: 10
sequence:
- service: light.turn_on
target: !input "light"
data:
brightness_step_pct: -10
transition: 1
- delay: 1