Hi to everyone,
in a theme I encountered I found an update card and I was wondering how it would work and I was interested in 1. having the card automatically filtering their original category and 2. the card should automatically find update entities, so if you remove or add addons, they’ll show up or don’t. So this is my approach. There is an issue though with a kind of border being around the mushroom update card that I wasn’t able to get rid of. So here’s my code for you and further development in case you’re interested in having such a card in the first place.
type: vertical-stack
title: ''
cards:
- type: custom:vertical-stack-in-card
cards:
- type: custom:mushroom-title-card
title: Updates
- type: conditional
conditions:
- condition: state
entity: sensor.updates_available
state: '3'
card:
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: ' Home Assistant Server'
subtitle: ''
- type: custom:auto-entities
card:
type: entities
state_color: false
filter:
include:
- domain: update
integration: hassio
state: 'on'
entity_id: '*sys'
options:
type: custom:mushroom-update-card
show_buttons_control: true
icon_type: entity-picture
layout: horizontal
exclude: []
sort:
method: entity_id
show_empty: false
- type: conditional
conditions:
- condition: state
entity: sensor.updates_available
state: '3'
card:
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: ' Addons'
subtitle: ''
- type: custom:auto-entities
card:
type: entities
state_color: false
show_header_toggle: false
filter:
include:
- domain: update
integration: hassio
state: 'on'
options:
type: custom:mushroom-update-card
show_buttons_control: true
icon_type: entity-picture
layout: horizontal
exclude:
- entity_id: '*sys'
sort:
method: entity_id
show_empty: false
- type: conditional
conditions:
- condition: state
entity: sensor.updates_available
state: '3'
card:
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: ' HACS'
subtitle: ''
- type: custom:auto-entities
card:
type: entities
state_color: false
filter:
include:
- domain: update
integration: hacs
state: 'on'
options:
type: custom:mushroom-update-card
show_buttons_control: true
icon_type: entity-picture
layout: horizontal
exclude:
- entity_id: '*sys'
sort:
method: entity_id
show_empty: false
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.updates_available
below: 1
card:
type: custom:mushroom-template-card
icon: mdi:check
icon_color: green
primary: No Updates available