Last active
April 10, 2019 16:37
-
-
Save ciotlosm/59d160ad49c695a801d9a940a2a387d2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mqtt: | |
broker: homeassistant # This will have to be your mqtt broker | |
discovery: true | |
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 | |
sensor: | |
- platform: mqtt | |
name: Bridge state | |
state_topic: "zigbee2mqtt/bridge/state" | |
icon: mdi:router-wireless | |
group: | |
zigbee_group: | |
name: Zigbee | |
entities: | |
- input_boolean.zigbee_permit_join | |
- timer.zigbee_permit_join | |
- sensor.bridge_state | |
automation: | |
- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Thanks for this file! :)
Where do I put this it?
I'm a bit lost!