Sign Show temperature near to time in notification bar (Right side of notification bar)

I am working on an application which need to show notification.
Since in a notification I am not able to set a dynamic text/icon for small icon user have to swipe down the notification to see/read notification message.

I MiUI roms I found that they are showing texts in status bar
(Right side of notification bar where time and connectivity status is shown).

How can I show temperature in status bar?
(Root access is fine for my application.)