Skip to content

Instantly share code, notes, and snippets.

@hrzlgnm
Last active January 5, 2021 20:27
Show Gist options
  • Save hrzlgnm/fb84cb04ba88b6d4bb4d6ba58245fc05 to your computer and use it in GitHub Desktop.
Save hrzlgnm/fb84cb04ba88b6d4bb4d6ba58245fc05 to your computer and use it in GitHub Desktop.
Blueprint to to bind actions to 4 buttons of a HmIP-KRC4 (Long/Short)
blueprint:
name: Actions for HmIP-DBB
description: When a button is pressed, the defined actions will be executed. Please keep in mind, that long-press actions might be executed multiple times, according to your configured minimum duration for long press. This can be configured in your CCU.
domain: automation
input:
remote:
name: Homematic Device
description: Please select a HmIP-DBB entity of your Homematic (not Homematic Cloud) integration by typing in the name of the device which was set in your CCU.
action_1_short:
name: Action
description: Button 1, Short Press
default: []
selector:
action: {}
action_1_long:
name: Action
description: Button 1, Long Press
default: []
selector:
action: {}
trigger:
- platform: event
event_type: homematic.keypress
event_data:
name: !input 'remote'
condition: []
action:
- variables:
channel: '{{ trigger.event.data.channel }}'
param: '{{ trigger.event.data.param }}'
short: 'PRESS_SHORT'
long: 'PRESS_LONG'
- choose:
- conditions: "{{ channel == 1 and param == short }}"
sequence: !input 'action_1_short'
- conditions: "{{ channel == 1 and param == long }}"
sequence: !input 'action_1_long'
mode: parallel
max: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment