Browse Source

adding zigbee2mqtt

master
Thomas 4 years ago
parent
commit
eda5df5060
Signed by: taschenbier
GPG Key ID: 306F574D34A9673B
  1. 46
      automations/automations.yaml
  2. 11
      configuration.yaml
  3. 8
      lovelace/home.yaml
  4. 4
      sensors/mqtt.yaml

46
automations/automations.yaml

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
- id: enable_zigbee_join
alias: Enable Zigbee joining
hide_entity: true
trigger:
platform: state
entity_id: input_boolean.zigbee_permit_join
to: 'on'
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/bridge/config/permit_join
payload: 'true'
- service: timer.start
data:
entity_id: timer.zigbee_permit_join
- id: disable_zigbee_join
alias: Disable Zigbee joining
trigger:
- entity_id: input_boolean.zigbee_permit_join
platform: state
to: 'off'
action:
- data:
payload: 'false'
topic: zigbee2mqtt/bridge/config/permit_join
service: mqtt.publish
- data:
entity_id: timer.zigbee_permit_join
service: timer.cancel
hide_entity: true
- id: disable_zigbee_join_timer
alias: Disable Zigbee joining by timer
hide_entity: true
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.zigbee_permit_join
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/bridge/config/permit_join
payload: 'false'
- service: input_boolean.turn_off
data:
entity_id: input_boolean.zigbee_permit_join

11
configuration.yaml

@ -17,6 +17,17 @@ recorder: @@ -17,6 +17,17 @@ recorder:
- binary_sensor
- person
input_boolean:
zigbee_permit_join:
name: Allow devices to join
initial: off
icon: mdi:cellphone-wireless
timer:
zigbee_permit_join:
name: Time remaining
duration: 600 # Updated this to the number of seconds you wish
sensor: !include_dir_merge_list sensors
switch: !include_dir_merge_list switches
automation: !include_dir_merge_list automations

8
lovelace/home.yaml

@ -5,6 +5,14 @@ cards: @@ -5,6 +5,14 @@ cards:
entity: weather.lug
details: false
- type: entities
entities:
- entity: input_boolean.zigbee_permit_join
- entity: timer.zigbee_permit_join
- entity: sensor.bridge_state
show_header_toggle: false
title: Zigbee
title: Home
path: home
panel: false

4
sensors/mqtt.yaml

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
- platform: mqtt
name: Bridge state
state_topic: "zigbee2mqtt/bridge/state"
icon: mdi:router-wireless
Loading…
Cancel
Save