Concatenate secret string with string in a sensor field

hi there,

i’m looking to hide my state topic info for some mqtt sensors in a secret variable. part of the string is redundant and part is unique for each sensor.

{prefix}/{domainName}/{machineName}/windows-monitor/stats/memory/usage

i want to store the following in a secret
{prefix}/{domainName}/{machineName}/windows-monitor/

then concatenate this in the acutal sensors.yaml

!secret mqtt_state_topic + stats/memory/usage

is this possible?

Nope, gotta put the full string in the secret.

that is what is seemed so that is what i ended up doing.

ty

Yah, there are a few limitations here. Secrets can only be used for a single full field. And you can’t concatenate any fields in yaml.