public static string GetDiscoveryTopic <TEntity>(this HassMqttTopicBuilder topicBuilder, string deviceId, string entityId) where TEntity : IHassDiscoveryDocument { // homeassistant/<sensor>/<my_device>/<my_entity>/config return(topicBuilder.GetDiscoveryTopic(DiscoveryHelper.GetDeviceType <TEntity>().AsString(EnumFormat.EnumMemberValue), deviceId, entityId, "config")); }