Make off behaviour configurable
This commit is contained in:
parent
b79b75ef9d
commit
ed5a341c1f
1 changed files with 34 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
blueprint:
|
blueprint:
|
||||||
name: Philips Hue 929002398602 + Zigbee2MQTT + Light
|
name: Philips Hue Dimmer MQTT control config
|
||||||
description: |
|
description: |
|
||||||
# Requirements:
|
# Requirements:
|
||||||
- Philips Hue Dimmer Switch 929002398602
|
- Philips Hue Dimmer Switch 929002398602
|
||||||
|
|
@ -16,6 +16,20 @@ blueprint:
|
||||||
name: Target MQTT Topic
|
name: Target MQTT Topic
|
||||||
description: Target light (e.g., zigbee2mqtt/light_1/set)
|
description: Target light (e.g., zigbee2mqtt/light_1/set)
|
||||||
default: "zigbee2mqtt/<your_target_device>/set"
|
default: "zigbee2mqtt/<your_target_device>/set"
|
||||||
|
off_brightness:
|
||||||
|
name: off_brightness
|
||||||
|
description: Brightness to set when off button is pressed
|
||||||
|
selector:
|
||||||
|
number:
|
||||||
|
min: 0
|
||||||
|
max: 254
|
||||||
|
step: 1
|
||||||
|
mode: slider
|
||||||
|
default: 0
|
||||||
|
off_state:
|
||||||
|
name: off_state
|
||||||
|
description: State to set when off button is pressed
|
||||||
|
default: "OFF"
|
||||||
|
|
||||||
move_rate:
|
move_rate:
|
||||||
name: Brightness Move Rate [steps/s]
|
name: Brightness Move Rate [steps/s]
|
||||||
|
|
@ -42,6 +56,8 @@ blueprint:
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
move_rate: !input move_rate
|
move_rate: !input move_rate
|
||||||
|
off_brightness: !input off_brightness
|
||||||
|
off_state: !input off_state
|
||||||
color_temp: !input color_temp
|
color_temp: !input color_temp
|
||||||
color: !input color
|
color: !input color
|
||||||
remote_topic: !input Remote_MQTT_Topic
|
remote_topic: !input Remote_MQTT_Topic
|
||||||
|
|
@ -72,6 +88,22 @@ action:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ trigger.payload == 'off_press' }}"
|
value_template: "{{ trigger.payload == 'off_press' }}"
|
||||||
|
sequence:
|
||||||
|
- service: mqtt.publish
|
||||||
|
data:
|
||||||
|
topic: "{{ target_topic }}"
|
||||||
|
payload: '{ "brightness": {{ off_brightness }} }'
|
||||||
|
qos: 0
|
||||||
|
retain: false
|
||||||
|
- service: mqtt.publish
|
||||||
|
data:
|
||||||
|
topic: "{{ target_topic }}"
|
||||||
|
payload: '{ "state": "{{ off_state }}" }'
|
||||||
|
qos: 0
|
||||||
|
retain: false
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ trigger.payload == 'off_hold' }}" # Long press
|
||||||
sequence:
|
sequence:
|
||||||
- service: mqtt.publish
|
- service: mqtt.publish
|
||||||
data:
|
data:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue