Skip to content

Instantly share code, notes, and snippets.

@ciotlosm
Last active Apr 10, 2019
Embed
What would you like to do?
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
@ciotlosm

This comment has been minimized.

Copy link
Owner Author

@ciotlosm ciotlosm commented Jun 2, 2018

Includes timer and bridge status
screen shot 2018-06-02 at 14 41 42

@clarocha

This comment has been minimized.

Copy link

@clarocha clarocha commented Nov 7, 2018

Hi, I dont know where to put this lines... is it in configuration.yaml or is somewhere in other place?

@boralyl

This comment has been minimized.

Copy link

@boralyl boralyl commented Jan 27, 2019

It goes in your configuration.yaml

@KoumaMisna

This comment has been minimized.

Copy link

@KoumaMisna KoumaMisna commented Feb 3, 2019

I got error messages like this to my home assistant log:
No matching payload found for entity: Bridge state with state_topic: zigbee2mqtt/bridge/state

Fixed it with this, maybe update your code?

  • platform: mqtt
    name: Bridge state
    payload_on: "online"
    payload_off: “offline”
    state_topic: "zigbee2mqtt/bridge/state"
    icon: mdi:router-wireless
@ronschaeffer

This comment has been minimized.

Copy link

@ronschaeffer ronschaeffer commented Feb 12, 2019

I got error messages like this to my home assistant log:
No matching payload found for entity: Bridge state with state_topic: zigbee2mqtt/bridge/state

Fixed it with this, maybe update your code?

  • platform: mqtt
    name: Bridge state
    payload_on: "online"
    payload_off: “offline”
    state_topic: "zigbee2mqtt/bridge/state"
    icon: mdi:router-wireless

Is this your config for the sensor: component? That's also not working for me. Should it instead include:

payload_available: "online"
payload_not_available: “offline”

@skjnldsv

This comment has been minimized.

Copy link

@skjnldsv skjnldsv commented Apr 10, 2019

Hello Thanks for this file! :)
Where do I put this it?
I'm a bit lost!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment