Get Badge count of HA side bar

Hello all,

is it possible to get the Badge counts of the sidebar (picture attached) for automations?
I would like to switch on a small LED light if there are numbers either at Settings or also at Notifications so i see it without opening the frontend.

BR Michl

You can achieve that with a custom plugin that I maintain. To add a notification to a sidebar item you need to use the notification order item property.

Edit: I misunderstood your question, I thought that you wanted to add a new notification in a sidebar item. And what you want is to get those numbers for an automation.

You can check the number of issues with sensor.active_issues and the number of updates with this template:

{{
  expand(states.update)
  | selectattr('state', 'eq', 'on')
  | list
  | length
}}

For the notifications you can try with sensor.persistent_notifications.

You can attach any badge to any icon in a sidebar by a card-mod theme.
Go to the main card-mod thread - 1 st post - fantastic link at the bottom - themes - sidebar - badges

The Template is working great,thanks. But with the sensors i did not have any luck. Do i have to activate them somewhere?

Oh yes, sorry, those sensors are coming from the Spook integration.

Perfect, thanks for clarifying. With all this i can build my automation. Thank you very much!

1 Like