I currently build some MQTT sensors by hand. Each of them refers to the SAME device. To define a manual device, I have to set the device map every time.
What is the best practive to reuse this information for each sensor? Can I define a variable with the map and simply set device: myDeviceVariableWithTheMap? Dont hit me, I did not found out how…
Home Assistant’s YAML documentation only covers the basics about YAML. It includes a link to YAML’s official documentation which is quite extensive (covering every aspect of it in Home Assistant’s documentation would be impractical).
Here’s the link to Anchors and Aliases in YAML’s documentation (and it’s admittedly not the easiest to digest):