fix: use new homeassistant condig dict
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2022-08-20 15:13:54 +02:00
parent 6f929d6ded
commit 08fcf347a9
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0

View File

@ -1,9 +1,16 @@
#jinja2:lstrip_blocks: True
---
{{ ansible_managed | comment }}
homeassistant: {{ zigbee2mqtt_homeassistant_enabled }}
permit_join: {{ zigbee2mqtt_permit_join }}
{% if zigbee2mqtt_homeassistant_enabled | bool %}
homeassistant:
discovery_topic: "{{ zigbee2mqtt_homeassistant_discovery_topic }}"
status_topic: "{{ zigbee2mqtt_homeassistant_status_topic }}"
legacy_entity_attributes: False
legacy_triggers: False
{% endif %}
mqtt:
base_topic: "{{ zigbee2mqtt_mqtt_base_topic }}"
server: "{{ zigbee2mqtt_mqtt_server }}"
@ -40,21 +47,19 @@ whitelist:
advanced:
pan_id: {{ zigbee2mqtt_pan_id }}
ext_pan_id: {{ zigbee2mqtt_ext_pan_id }}
channel: {{ zigbee2mqtt_channel }}
cache_state: {{ zigbee2mqtt_cache_state }}
log_level: "{{ zigbee2mqtt_log_level }}"
{% if zigbee2mqtt_network_key is defined and zigbee2mqtt_network_key %}
network_key: {{ zigbee2mqtt_network_key }}
{% endif %}
channel: {{ zigbee2mqtt_channel }}
cache_state: {{ zigbee2mqtt_cache_state }}
log_level: "{{ zigbee2mqtt_log_level }}"
last_seen: "{{ zigbee2mqtt_last_seen }}"
elapsed: {{ zigbee2mqtt_elapsed }}
homeassistant_discovery_topic: "{{ zigbee2mqtt_homeassistant_discovery_topic }}"
homeassistant_status_topic: "{{ zigbee2mqtt_homeassistant_status_topic }}"
{% if zigbee2mqtt_device_options is defined %}
{% if zigbee2mqtt_device_options is defined %}
device_options:
{{ zigbee2mqtt_device_options | to_nice_yaml | indent(2) }}
{% endif %}
{% endif %}
devices: "devices.yaml"
groups: "groups.yaml"