Last active
August 24, 2021 12:24
-
-
Save nicsuzor/cfc431e928a42f7ca12983259b8d2939 to your computer and use it in GitHub Desktop.
Blueprint for IKEA remotes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias: ikea remotes | |
description: 'Office light dimmer for HomeAssistant and Zigbee2MQTT and Ikea switches' | |
blueprint: | |
name: ikea remote blueprint NS | |
description: Turn a light on based on dimmer switch | |
domain: automation | |
input: | |
dimmer_switch: | |
name: Dimmer switch | |
description: The action of the dimmer switch. | |
selector: | |
entity: | |
target_light: | |
name: Lights | |
description: The lights to keep in sync. | |
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 | |
max: 100 | |
mode: slider | |
step: 1 | |
unit_of_measurement: "%" | |
button_left_short: | |
name: Left button - short press | |
description: Action to run on short left button press | |
default: [] | |
selector: | |
action: | |
button_left_long: | |
name: Left button - long press | |
description: Action to run on long left button press | |
default: [] | |
selector: | |
action: | |
button_right_short: | |
name: Right button - short press | |
description: Action to run on short right button press | |
default: [] | |
selector: | |
action: | |
button_right_long: | |
name: Right button - long press | |
description: Action to run on long right button press | |
default: [] | |
selector: | |
action: | |
button_on: | |
name: on button, short press | |
description: action to run when you press 'on' | |
default: [] | |
selector: | |
action: | |
button_off: | |
name: off button, short press | |
description: action to run when you press 'off' | |
default: [] | |
selector: | |
action: | |
button_up: | |
name: up button, long press | |
description: action to run when you hold up (or center) | |
default: [] | |
selector: | |
action: | |
button_down: | |
name: down button, long press | |
description: action to run when you hold down | |
default: [] | |
selector: | |
action: | |
trigger: | |
- platform: state | |
entity_id: !input dimmer_switch | |
attribute: action | |
to: 'off' | |
id: 'off' | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: 'on' | |
attribute: action | |
to: 'on' | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: up | |
attribute: action | |
to: brightness_move_up | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: up | |
attribute: action | |
to: brightness_up_click | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: up | |
attribute: action | |
to: brightness_up_hold | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: down | |
attribute: action | |
to: brightness_down_hold | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: down | |
attribute: action | |
to: brightness_down_click | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: down | |
attribute: action | |
to: brightness_move_down | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: toggle | |
attribute: action | |
to: toggle | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: left | |
attribute: action | |
to: arrow_left_click | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: left | |
attribute: action | |
to: arrow_left_hold | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: right | |
attribute: action | |
to: arrow_right_click | |
- platform: state | |
entity_id: !input dimmer_switch | |
id: right | |
attribute: action | |
to: arrow_right_click | |
action: | |
- choose: | |
- conditions: | |
- condition: trigger | |
id: up | |
sequence: | |
- service: light.turn_on | |
target: !input target_light | |
data: | |
brightness_step_pct: 25 | |
- conditions: | |
- condition: trigger | |
id: down | |
sequence: | |
- service: light.turn_on | |
target: !input target_light | |
data: | |
brightness_step_pct: -25 | |
- conditions: | |
- condition: trigger | |
id: 'off' | |
sequence: | |
- service: light.turn_off | |
target: !input target_light | |
- conditions: | |
- condition: trigger | |
id: 'on' | |
sequence: | |
- service: light.turn_on | |
target: !input target_light | |
data: | |
brightness_pct: 50 | |
- conditions: | |
- condition: trigger | |
id: 'toggle' | |
sequence: | |
- service: light.toggle | |
target: !input target_light | |
data: | |
brightness_step_pct: 25 | |
mode: restart | |
max_exceeded: silent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment