Replace 'Unknown'-value of nested groups with variable

Hi all,

Could anyone send my in the right direction to replace the ‘Unknown’-value of nested groups with a variable inside that group?
Like so:
hassio-4

Thanks!
Jelle