Skip to content

Instantly share code, notes, and snippets.

@ciotlosm
Last active June 1, 2018 08:54
Show Gist options
  • Save ciotlosm/3e074c4ba8b32ded32ef1da22b70a7f9 to your computer and use it in GitHub Desktop.
Save ciotlosm/3e074c4ba8b32ded32ef1da22b70a7f9 to your computer and use it in GitHub Desktop.
Home Assistant - ZHA - Permit join setup
zha:
usb_path: /dev/ttyAMA0
database_path: zigbee.db
baudrate: 57600
input_boolean:
zigbee_permit_join:
name: Allow zigbee to join
initial: off
icon: mdi:cellphone-wireless
timer:
zigbee_permit_join:
name: Allow zigbee to join
duration: 60
zigbee_group:
name: Zigbee
control: hidden
entities:
- input_boolean.zigbee_permit_join
- timer.zigbee_permit_join
automation:
- id: enable_zigbee_joining
alias: Enable zigbee joining
hide_entity: true
trigger:
- platform: state
entity_id: input_boolean.zigbee_permit_join
to: 'on'
action:
- service: zha.permit
- service: timer.start
data:
entity_id: timer.zigbee_permit_join
- id: reset_zigbee_joining
alias: Reset zigbee joining
hide_entity: true
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.zigbee_permit_join
action:
- 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