Is there any way to get this yaml to work with variables at top?
ESP_MAC: "A848FAC08D39"
zone0: "Køkken"
zone1: "Køkken1"
zone2: "Køkken2"
zone3: "Køkken3"
zone4: "Køkken4"
zone5: "Køkken5"
zone6: "Køkken6"
zone7: "Køkken7"
zone8: "Køkken8"
zone9: "Køkken9"
zone10: "Køkken10"
zone11: "Køkken11"
zone12: "Køkken12"
zone13: "Køkken13"
zone14: "Køkken14"
zone15: "Køkken15"
climate wavinAhc9000:
- platform: mqtt
name: "{{zone0}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/0/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/0/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/0/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/0/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/0/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone1}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/1/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/1/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/1/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/1/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/1/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone2}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/2/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/2/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/2/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/2/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/2/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone3}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/3/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/3/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/3/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/3/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/3/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone4}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/4/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/4/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/4/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/4/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/4/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone5}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/5/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/5/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/5/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/5/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/5/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone6}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/6/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/6/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/6/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/6/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/6/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone7}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/7/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/7/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/7/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/7/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/7/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone8}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/8/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/8/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/8/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/8/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/8/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone9}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/9/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/9/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/9/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/9/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/9/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone10}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/10/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/10/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/10/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/10/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/10/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone11}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/11/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/11/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/11/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/11/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/11/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone12}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/12/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/12/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/12/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/12/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/12/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone13}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/13/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/13/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/13/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/13/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/13/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone14}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/14/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/14/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/14/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/14/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/14/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
- platform: mqtt
name: "{{zone15}}"
current_temperature_topic: "heat/floor{{ESP_MAC}}/15/current"
temperature_command_topic: "heat/floor{{ESP_MAC}}/15/target_set"
temperature_state_topic: "heat/floor{{ESP_MAC}}/15/target"
mode_command_topic: "heat/floor{{ESP_MAC}}/15/mode_set"
mode_state_topic: "heat/floor{{ESP_MAC}}/15/mode"
modes:
- "heat"
- "off"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
qos: 0
sensor wavinBattery:
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/0/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone0}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/1/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone1}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/2/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone2}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/3/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone3}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/4/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone4}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/5/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone5}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/6/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone6}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/7/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone7}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/8/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone8}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/9/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone9}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/10/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone10}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/11/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone11}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/12/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone12}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/13/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone13}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/14/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone14}}"
unit_of_measurement: "%"
device_class: battery
qos: 0
- platform: mqtt
state_topic: "heat/floor{{ESP_MAC}}/15/battery"
availability_topic: "heat/floor{{ESP_MAC}}/online"
payload_available: "True"
payload_not_available: "False"
name: "{{zone15}}"
unit_of_measurement: "%"
device_class: battery
qos: 0