Skip to content

Instantly share code, notes, and snippets.

@shbatm
Last active August 1, 2023 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shbatm/f822005e2c9eea8225342d0148d3f4cd to your computer and use it in GitHub Desktop.
Save shbatm/f822005e2c9eea8225342d0148d3f4cd to your computer and use it in GitHub Desktop.
Home Assistant Blueprint: ISY/IoX Button Light Control
blueprint:
name: ISY/IoX Button Light Control
description: |-
Control a light with an ISY/IoX button like a KeypadLinc or RemoteLinc.
Supports ON, FAST ON, OFF, FAST OFF, and a Nightlight mode (turn fast off while off)
Transition times are 1s for On/Off and 0s for Fast On/Fast Off.
domain: automation
input:
button_sensor:
name: Button Sensor Entity
description: The sensor entity_id for the button you would like to use as a trigger.
selector:
entity:
multiple: false
domain: sensor
integration: isy994
target_light:
name: Light
description: The target light you would like to control.
selector:
entity:
domain: light
multiple: true
on_level:
name: On Level
description: The On-Level (%) to use for a normal "ON" command
selector:
number:
min: 0
max: 100
step: 1
unit_of_measurement: '%'
mode: slider
nightlight_brightness:
name: Nightlight Brightness
description: The brightness (%) to use for the nightlight
selector:
number:
min: 0
max: 100
step: 1
unit_of_measurement: '%'
mode: slider
trigger:
- platform: event
event_type: isy994_control
event_data:
entity_id: !input button_sensor
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.control == \"DON\" }}"
alias: Turned On
sequence:
- service: light.turn_on
data:
transition: 1
brightness_pct: !input on_level
target:
entity_id: !input target_light
- conditions:
- condition: template
value_template: "{{ trigger.event.data.control == \"DFON\" }}"
alias: Turned Fast On
sequence:
- service: light.turn_on
data:
transition: 0
brightness_pct: 100
target:
entity_id: !input target_light
- conditions:
- condition: template
value_template: "{{ trigger.event.data.control == \"DOF\" }}"
alias: Turned Off
sequence:
- service: light.turn_off
data:
transition: 1
target:
entity_id: !input target_light
- conditions:
- condition: template
value_template: "{{ trigger.event.data.control == \"DFOF\" }}"
alias: Turned Fast Off while On
- condition: state
entity_id: !input target_light
state: "on"
sequence:
- service: light.turn_off
data:
transition: 0
target:
entity_id: !input target_light
- conditions:
- condition: template
value_template: "{{ trigger.event.data.control == \"DFOF\" }}"
alias: Nightlight (Fast Off while Off)
- condition: state
entity_id: !input target_light
state: "off"
sequence:
- service: light.turn_on
data:
transition: 0
brightness_pct: !input nightlight_brightness
target:
entity_id: !input target_light
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment