After you add the information to your configuration.yaml file, execute Configuration > Server Controls > Check Configuration and ensure no errors are reported. Then execute Configuration > Server Controls > Reload Template Entities. A new sensor will be created: sensor.network_client_status
The sensor’s state value will contain a comma-delimited list of server names such as “synology, Windows Server”. If will also automatically appear in the Lovelace UI.
NOTE
An entity’s state value is limited to 255 characters. If you believe that’s insufficient for your application, we will have to change the Template Sensor’s configuration so that it stores the server names in an attribute (which doesn’t have a 255-character limit).
I’ve got the data in an existing mqtt sensor and I’m trying to reference this in the template. Although no errors, I see this when looking at the sensor created:
I apologize for misleading you. You are using an MQTT Sensor and I’ve been dealing with Template Sensors all day and gave you a screwed up example of one.
You’re welcome and I’m glad to hear it resolved the issue.
Please consider marking my post above with the Solution tag. Only you, the author of this topic, can mark one post. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.