Context is in truenas/apps#1450.
The problem is that TrueNAS disallows other Avahi stacks (meaning it doesn’t allow forwarding from the default port) which diverges from the default. It means that EspHome doesn’t work. Please change the setting disallow-other-stacks=no
in /etc/avahi/avahi-daemon.conf
or just not anything since it’s the default.