From 2c016036623408abdcccdeabf6c7e3852f6a9ad4 Mon Sep 17 00:00:00 2001 From: Kevin Eifinger Date: Thu, 21 Mar 2019 17:50:53 +0100 Subject: [PATCH] fix log level settings for zigbee2mqtt --- packages/zigbee2mqtt.yaml | 238 +++++++++++++++++--------------------- 1 file changed, 109 insertions(+), 129 deletions(-) diff --git a/packages/zigbee2mqtt.yaml b/packages/zigbee2mqtt.yaml index 700164df..20e7ed3c 100644 --- a/packages/zigbee2mqtt.yaml +++ b/packages/zigbee2mqtt.yaml @@ -7,10 +7,10 @@ sensor: name: Zigbee2mqtt1 Bridge state state_topic: "zigbee2mqtt1/bridge/state" icon: mdi:router-wireless - - platform: mqtt - name: Zigbee2mqtt2 Bridge state - state_topic: "zigbee2mqtt2/bridge/state" - icon: mdi:router-wireless + # - platform: mqtt + # name: Zigbee2mqtt2 Bridge state + # state_topic: "zigbee2mqtt2/bridge/state" + # icon: mdi:router-wireless input_boolean: zigbee_permit_join: @@ -21,10 +21,10 @@ input_boolean: name: Allow devices to join 1 initial: off icon: mdi:cellphone-wireless - zigbee_permit_join2: - name: Allow devices to join 2 - initial: off - icon: mdi:cellphone-wireless + # zigbee_permit_join2: + # name: Allow devices to join 2 + # initial: off + # icon: mdi:cellphone-wireless input_select: zigbee2mqtt_log_level: @@ -45,15 +45,15 @@ input_select: - error initial: info icon: mdi:format-list-bulleted - zigbee2mqtt_log_level2: - name: Zigbee2mqtt2 Log Level - options: - - debug - - info - - warn - - error - initial: info - icon: mdi:format-list-bulleted + # zigbee2mqtt_log_level2: + # name: Zigbee2mqtt2 Log Level + # options: + # - debug + # - info + # - warn + # - error + # initial: info + # icon: mdi:format-list-bulleted switch: - platform: mqtt @@ -68,12 +68,12 @@ switch: command_topic: "zigbee2mqtt1/bridge/config/permit_join" payload_on: "true" payload_off: "false" - - platform: mqtt - name: "Zigbee2mqtt2 Main join" - state_topic: "zigbee2mqtt2/bridge/config/permit_join" - command_topic: "zigbee2mqtt2/bridge/config/permit_join" - payload_on: "true" - payload_off: "false" + # - platform: mqtt + # name: "Zigbee2mqtt2 Main join" + # state_topic: "zigbee2mqtt2/bridge/config/permit_join" + # command_topic: "zigbee2mqtt2/bridge/config/permit_join" + # payload_on: "true" + # payload_off: "false" timer: zigbee_permit_join: @@ -82,9 +82,9 @@ timer: zigbee_permit_join1: name: Time remaining 1 duration: 120 - zigbee_permit_join2: - name: Time remaining 2 - duration: 120 + # zigbee_permit_join2: + # name: Time remaining 2 + # duration: 120 automation: ################################################################# @@ -96,20 +96,10 @@ automation: trigger: - platform: state entity_id: input_select.zigbee2mqtt_log_level - to: debug - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: warn - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: error - - platform: state - entity_id: input_select.zigbee2mqtt_log_level - to: info action: - service: mqtt.publish data: - payload_template: '{{ states(''input_select.zigbee2mqtt_log_level'') }}' + payload_template: '{{ states('input_select.zigbee2mqtt_log_level') }}' topic: zigbee2mqtt/bridge/config/log_level - id: enable_zigbee_join @@ -176,26 +166,16 @@ automation: ################################################################# ## 1 ################################################################# -- id: zigbee2mqtt1_log_level +- id: zigbee2mqtt_log_level1 alias: Zigbee2mqtt1 Log Level initial_state: 'on' trigger: - platform: state - entity_id: input_select.zigbee2mqtt1_log_level - to: debug - - platform: state - entity_id: input_select.zigbee2mqtt1_log_level - to: warn - - platform: state - entity_id: input_select.zigbee2mqtt1_log_level - to: error - - platform: state - entity_id: input_select.zigbee2mqtt1_log_level - to: info + entity_id: input_select.zigbee2mqtt_log_level1 action: - service: mqtt.publish data: - payload_template: '{{ states(''input_select.zigbee2mqtt1_log_level'') }}' + payload_template: '{{ states('input_select.zigbee2mqtt_log_level1') }}' topic: zigbee2mqtt1/bridge/config/log_level - id: enable_zigbee_join1 @@ -262,89 +242,89 @@ automation: ################################################################# ## 2 ################################################################# -- id: zigbee2mqtt_log_level2 - alias: Zigbee2mqtt2 Log Level - initial_state: 'on' - trigger: - - platform: state - entity_id: input_select.zigbee2mqtt_log_level2 - to: debug - - platform: state - entity_id: input_select.zigbee2mqtt_log_level2 - to: warn - - platform: state - entity_id: input_select.zigbee2mqtt_log_level2 - to: error - - platform: state - entity_id: input_select.zigbee2mqtt_log_level2 - to: info - action: - - service: mqtt.publish - data: - payload_template: '{{ states(''input_select.zigbee2mqtt_log_level2'') }}' - topic: zigbee2mqtt2/bridge/config/log_level +# - id: zigbee2mqtt_log_level2 +# alias: Zigbee2mqtt2 Log Level +# initial_state: 'on' +# trigger: +# - platform: state +# entity_id: input_select.zigbee2mqtt_log_level2 +# to: debug +# - platform: state +# entity_id: input_select.zigbee2mqtt_log_level2 +# to: warn +# - platform: state +# entity_id: input_select.zigbee2mqtt_log_level2 +# to: error +# - platform: state +# entity_id: input_select.zigbee2mqtt_log_level2 +# to: info +# action: +# - service: mqtt.publish +# data: +# payload_template: '{{ states(''input_select.zigbee2mqtt_log_level2'') }}' +# topic: zigbee2mqtt2/bridge/config/log_level -- id: enable_zigbee_join2 - alias: Enable Zigbee joining 2 - hide_entity: true - trigger: - platform: state - entity_id: input_boolean.zigbee_permit_join2 - to: 'on' - action: - - service: mqtt.publish - data: - topic: zigbee2mqtt2/bridge/config/permit_join - payload: 'true' - - service: timer.start - data: - entity_id: timer.zigbee_permit_join2 +# - id: enable_zigbee_join2 +# alias: Enable Zigbee joining 2 +# hide_entity: true +# trigger: +# platform: state +# entity_id: input_boolean.zigbee_permit_join2 +# to: 'on' +# action: +# - service: mqtt.publish +# data: +# topic: zigbee2mqtt2/bridge/config/permit_join +# payload: 'true' +# - service: timer.start +# data: +# entity_id: timer.zigbee_permit_join2 -- id: disable_zigbee_join2 - alias: Disable Zigbee joining 2 - hide_entity: true - trigger: - - entity_id: input_boolean.zigbee_permit_join2 - platform: state - to: 'off' - action: - - data: - payload: 'false' - topic: zigbee2mqtt2/bridge/config/permit_join - service: mqtt.publish - - data: - entity_id: timer.zigbee_permit_join2 - service: timer.cancel +# - id: disable_zigbee_join2 +# alias: Disable Zigbee joining 2 +# hide_entity: true +# trigger: +# - entity_id: input_boolean.zigbee_permit_join2 +# platform: state +# to: 'off' +# action: +# - data: +# payload: 'false' +# topic: zigbee2mqtt2/bridge/config/permit_join +# service: mqtt.publish +# - data: +# entity_id: timer.zigbee_permit_join2 +# service: timer.cancel -- id: disable_zigbee_join_timer2 - alias: Disable Zigbee joining by timer 2 - hide_entity: true - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.zigbee_permit_join2 - action: - - service: mqtt.publish - data: - topic: zigbee2mqtt2/bridge/config/permit_join - payload: 'false' - - service: input_boolean.turn_off - data: - entity_id: input_boolean.zigbee_permit_join2 +# - id: disable_zigbee_join_timer2 +# alias: Disable Zigbee joining by timer 2 +# hide_entity: true +# trigger: +# - platform: event +# event_type: timer.finished +# event_data: +# entity_id: timer.zigbee_permit_join2 +# action: +# - service: mqtt.publish +# data: +# topic: zigbee2mqtt2/bridge/config/permit_join +# payload: 'false' +# - service: input_boolean.turn_off +# data: +# entity_id: input_boolean.zigbee_permit_join2 -- id: alert_zigbee_bridge_offline2 - alias: 'Alarm wenn Zigbee2Mqtt2 offline' - initial_state: 'on' - trigger: - - entity_id: sensor.zigbee2mqtt2_bridge_state - platform: state - to: 'offline' - action: - - service: notify.kevin - data: - title: 'Zigbee2Mqtt2 offline' - message: "Zigbee2Mqtt2 ist offline" +# - id: alert_zigbee_bridge_offline2 +# alias: 'Alarm wenn Zigbee2Mqtt2 offline' +# initial_state: 'on' +# trigger: +# - entity_id: sensor.zigbee2mqtt2_bridge_state +# platform: state +# to: 'offline' +# action: +# - service: notify.kevin +# data: +# title: 'Zigbee2Mqtt2 offline' +# message: "Zigbee2Mqtt2 ist offline" ################################################################# ## Map #################################################################