mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-26 18:57:17 +00:00
Small example code improvements to deCONZ (#17132)
This commit is contained in:
parent
c1bae9664b
commit
c19755a095
@ -192,24 +192,24 @@ automation:
|
|||||||
- alias: "'Toggle lamp from dimmer'"
|
- alias: "'Toggle lamp from dimmer'"
|
||||||
initial_state: "on"
|
initial_state: "on"
|
||||||
trigger:
|
trigger:
|
||||||
platform: event
|
- platform: event
|
||||||
event_type: deconz_event
|
event_type: deconz_event
|
||||||
event_data:
|
event_data:
|
||||||
id: remote_control_1
|
id: remote_control_1
|
||||||
event: 1002
|
event: 1002
|
||||||
action:
|
action:
|
||||||
service: light.toggle
|
- service: light.toggle
|
||||||
target:
|
target:
|
||||||
entity_id: light.lamp
|
entity_id: light.lamp
|
||||||
|
|
||||||
- alias: "Increase brightness of lamp from dimmer"
|
- alias: "Increase brightness of lamp from dimmer"
|
||||||
initial_state: "on"
|
initial_state: "on"
|
||||||
trigger:
|
trigger:
|
||||||
platform: event
|
- platform: event
|
||||||
event_type: deconz_event
|
event_type: deconz_event
|
||||||
event_data:
|
event_data:
|
||||||
id: remote_control_1
|
id: remote_control_1
|
||||||
event: 2002
|
event: 2002
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
target:
|
target:
|
||||||
@ -222,11 +222,11 @@ automation:
|
|||||||
- alias: "Decrease brightness of lamp from dimmer"
|
- alias: "Decrease brightness of lamp from dimmer"
|
||||||
initial_state: "on"
|
initial_state: "on"
|
||||||
trigger:
|
trigger:
|
||||||
platform: event
|
- platform: event
|
||||||
event_type: deconz_event
|
event_type: deconz_event
|
||||||
event_data:
|
event_data:
|
||||||
id: remote_control_1
|
id: remote_control_1
|
||||||
event: 3002
|
event: 3002
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
target:
|
target:
|
||||||
@ -239,15 +239,15 @@ automation:
|
|||||||
- alias: 'Turn lamp on when turning cube clockwise'
|
- alias: 'Turn lamp on when turning cube clockwise'
|
||||||
initial_state: "on"
|
initial_state: "on"
|
||||||
trigger:
|
trigger:
|
||||||
platform: event
|
- platform: event
|
||||||
event_type: deconz_event
|
event_type: deconz_event
|
||||||
event_data:
|
event_data:
|
||||||
id: remote_control_1
|
id: remote_control_1
|
||||||
gesture: 7
|
gesture: 7
|
||||||
action:
|
action:
|
||||||
service: light.turn_on
|
- service: light.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: light.lamp
|
entity_id: light.lamp
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
@ -286,27 +286,27 @@ automation:
|
|||||||
- alias: "Flash Hue Bulb with Doorbell Motion"
|
- alias: "Flash Hue Bulb with Doorbell Motion"
|
||||||
mode: single
|
mode: single
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.doorbell_motion
|
entity_id: binary_sensor.doorbell_motion
|
||||||
to: "on"
|
to: "on"
|
||||||
action:
|
action:
|
||||||
- service: deconz.configure
|
- service: deconz.configure
|
||||||
data:
|
|
||||||
entity: light.hue_lamp
|
|
||||||
field: /state
|
|
||||||
data:
|
data:
|
||||||
'on': true
|
entity: light.hue_lamp
|
||||||
hue: 65535
|
field: /state
|
||||||
sat: 255
|
data:
|
||||||
bri: 255
|
'on': true
|
||||||
alert: breathe
|
hue: 65535
|
||||||
- delay: 00:00:15
|
sat: 255
|
||||||
- service: deconz.configure
|
bri: 255
|
||||||
data:
|
alert: "breathe"
|
||||||
entity: light.hue_lamp
|
- delay: 00:00:15
|
||||||
field: /state
|
- service: deconz.configure
|
||||||
data:
|
data:
|
||||||
'on': false
|
entity: light.hue_lamp
|
||||||
|
field: "/state"
|
||||||
|
data:
|
||||||
|
'on': false
|
||||||
```
|
```
|
||||||
|
|
||||||
## Binary Sensor
|
## Binary Sensor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user