Hi, I’m really sorry for such a silly question but I really can’t find how to do it.
How can I replicate same parameters to different entities in yaml files?
For example: in my setup I have many covers which require the same parameters like:
cover:
- name: "Tapparella Lavanderia"
availability_topic: "tele/tlavanderia/LWT"
state_topic: "tele/tlavanderia/SENSOR"
position_topic: "stat/tlavanderia/SHUTTER1"
set_position_topic: "cmnd/tlavanderia/shutterposition"
command_topic: "cmnd/tlavanderia/backlog"
platform: mqtt
value_template: "{{ value | int }}"
position_open: 100
position_closed: 0
payload_available: "Online"
payload_not_available: "Offline"
payload_open: "SHUTTEROPEN"
payload_close: "SHUTTERCLOSE"
payload_stop: "SHUTTERSTOP"
optimistic: false
qos: 1
sensor:
- name: "Tapparella Lavanderia"
platform: mqtt
state_topic: "tele/tlavanderia/SENSOR"
value_template: "{{ value_json['SHUTTER-1'].position }}"
Is there a way to create a “template” (homeassistant templates seem a different thing to me) for my covers avoiding to repeat many times the same parameters?
Thanks.