Add more devices via zigbee2mqtt

This commit is contained in:
2020-06-24 22:38:36 +03:00
parent 160d93d14f
commit 4e78b2f4ec
7 changed files with 107 additions and 24 deletions
@@ -1,11 +1,41 @@
sensor:
- platform: mqtt
name: "Bathroom switch click"
state_topic: "zigbee2mqtt/bathroom_switch"
availability_topic: "zigbee2mqtt/bridge/state"
icon: "mdi:toggle-switch"
value_template: "{{ value_json.click }}"
- platform: mqtt
name: "Bathroom switch battery"
state_topic: "zigbee2mqtt/bathroom_switch"
availability_topic: "zigbee2mqtt/bridge/state"
unit_of_measurement: "%"
device_class: "battery"
value_template: "{{ value_json.battery }}"
- platform: mqtt
name: "Bathroom switch action"
state_topic: "zigbee2mqtt/bathroom_switch"
availability_topic: "zigbee2mqtt/bridge/state"
icon: "mdi:gesture-double-tap"
value_template: "{{ value_json.action }}"
- platform: mqtt
name: "Bathroom switch LQI"
state_topic: "zigbee2mqtt/bathroom_switch"
availability_topic: "zigbee2mqtt/bridge/state"
icon: "mdi:signal"
unit_of_measurement: "lqi"
value_template: "{{ value_json.linkquality }}"
automation:
- alias: Media · Sonos · Volume up on bathroom switch click
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret bathroom_switch_ieee
command: single
platform: mqtt
topic: "zigbee2mqtt/bathroom_switch"
condition:
- condition: state
entity_id: sensor.bathroom_switch_click
state: 'single'
action:
- service: media_player.volume_set
entity_id: media_player.bathroom
@@ -20,11 +50,12 @@ automation:
- alias: Youtube · play latest pds on bathroom switch dobule click
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret bathroom_switch_ieee
command: double
platform: mqtt
topic: "zigbee2mqtt/bathroom_switch"
condition:
- condition: state
entity_id: sensor.bathroom_switch_click
state: 'double'
action:
- service: media_player.volume_set
entity_id: media_player.bathroom
+2 -2
View File
@@ -1,5 +1,5 @@
light:
- platform: "mqtt"
- platform: mqtt
name: "Bed LED"
state_topic: "zigbee2mqtt/bed_led"
availability_topic: "zigbee2mqtt/bridge/state"
@@ -11,7 +11,7 @@ light:
brightness_scale: 254
sensor:
- platform: "mqtt"
- platform: mqtt
name: "Bed LED LQI"
state_topic: "zigbee2mqtt/bed_led"
availability_topic: "zigbee2mqtt/bridge/state"