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:
|
||||
name: Philips Hue 929002398602 + Zigbee2MQTT + Light
|
||||
name: Philips Hue Dimmer MQTT control config
|
||||
description: |
|
||||
# Requirements:
|
||||
- Philips Hue Dimmer Switch 929002398602
|
||||
|
|
@ -16,6 +16,20 @@ blueprint:
|
|||
name: Target MQTT Topic
|
||||
description: Target light (e.g., zigbee2mqtt/light_1/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:
|
||||
name: Brightness Move Rate [steps/s]
|
||||
|
|
@ -42,6 +56,8 @@ blueprint:
|
|||
|
||||
variables:
|
||||
move_rate: !input move_rate
|
||||
off_brightness: !input off_brightness
|
||||
off_state: !input off_state
|
||||
color_temp: !input color_temp
|
||||
color: !input color
|
||||
remote_topic: !input Remote_MQTT_Topic
|
||||
|
|
@ -72,6 +88,22 @@ action:
|
|||
- conditions:
|
||||
- condition: template
|
||||
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:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
|
|
@ -82,7 +114,7 @@ action:
|
|||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "{{ target_topic }}"
|
||||
payload: '{ "state":"OFF" }'
|
||||
payload: '{ "state": "OFF" }'
|
||||
qos: 0
|
||||
retain: false
|
||||
- conditions:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue