Hi, I used for quite some time the beautiful card of i00 (SRM sensor · Issue #1 · i00/Chatter · GitHub) which shows with the help of auto-entities, multiple-entity-row and custom card a nice overview of all my network devices.
It should look something like this:
Now after some time (not sure since what release), it looks like this:
Diving into to the code could not lead for myself to a solution:
card:
show_header_toggle: false
title: Devices
type: entities
state_color: false
filter:
include:
- attributes:
scanner: SynologySrmDeviceScanner
entity_id: device_tracker.*
state: home
options:
entities:
- attribute: mac
- attribute: ip_addr
- icon: mdi:ethernet
- icon: mdi:wifi-strength-1
- icon: mdi:wifi-strength-2
- icon: mdi:wifi-strength-4
- icon: mdi:gamepad-variant-outline
- icon: mdi:cellphone
- icon: mdi:television
- icon: mdi:dlna
- icon: mdi:desktop-tower
- icon: mdi:nas
- icon: mdi:laptop
- icon: mdi:tablet
- icon: mdi:cctv
- icon: mdi:printer
- icon: mdi:router-wireless
- icon: mdi:home-assistant
- icon: mdi:home-automation
icon: mdi:none
secondary_info:
attribute: band
show_state: false
style: >
{% set lMAC = 1 %} {% set lIP = 2 %} {% set iEthernet = 3 %} {% set
iWiFiBad = 4 %} {% set iWiFiOK = 5 %} {% set iWiFiGood = 6 %} {% set
iGame = 7 %} {% set iPhone = 8 %} {% set iTV = 9 %} {% set iDLNA = 10
%} {% set iDesktop = 11 %} {% set iNAS = 12 %} {% set iLaptop = 13 %}
{% set iTablet = 14 %} {% set iCamera = 15 %} {% set iPrinter = 16 %}
{% set iRouter = 17 %} {% set iDefault = 18 %} {% set iOthers = 19 %}
div.entity:nth-child({{lMAC}}),div.entity:nth-child({{lIP}}) {
margin-right:0;
} div.entity:nth-child({% if state_attr(config.entity, 'ip_addr') ==
'' %}{{lIP}}{% else %}{{lMAC}}{% endif %}) {
display: none !important;
visibility: hidden !important;
position: absolute !important;
} .secondary {
padding-left:16px;
} {% if state_attr(config.entity, 'is_wireless') == false %}
.secondary {
visibility: hidden;
} .secondary:before {
content: 'Ethernet';
visibility: visible;
} {% else %} .secondary:after {
content: ' (Level {% if state_attr(config.entity, 'mesh_node_id') == 0 %}1{% elif state_attr(config.entity, 'mesh_node_id') == 4 %}3{% elif state_attr(config.entity, 'mesh_node_id') == 3 %}4{% else %}?{% endif %})';
} {% endif %}
div.entity:nth-child({{iEthernet}}),div.entity:nth-child({{iWiFiBad}}),div.entity:nth-child({{iWiFiOK}}),div.entity:nth-child({{iWiFiGood}})
{
--mdc-icon-size: 16px;
position: absolute;
top: 11px;
left: 37px;
visibility: hidden;
} div.entity:nth-child({% if state_attr(config.entity, 'is_wireless')
== false %}{{iEthernet}}{% elif state_attr(config.entity,
'rate_quality') == 'low' %}{{iWiFiBad}}{% elif
state_attr(config.entity, 'rate_quality') == 'middle' %}{{iWiFiOK}}{%
elif state_attr(config.entity, 'rate_quality') == 'high'
%}{{iWiFiGood}}{% endif %}) {
visibility: visible;
} :host>state-badge {
{% if state_attr(config.entity, 'dev_type') != 'others' and state_attr(config.entity, 'dev_type') != 'default' %}
visibility: hidden;
{% endif %}
} div.entity:nth-child(n+{{iGame}}{# << This is the first icon for the
device type #}) {
position: absolute;
top: 0px;
left: 8px;
visibility: hidden;
} div.entity:nth-child({% if state_attr(config.entity, 'dev_type') ==
'gamebox' %}{{iGame}}{% elif state_attr(config.entity, 'dev_type') ==
'phone' %}{{iPhone}}{% elif state_attr(config.entity, 'dev_type') ==
'tv' %}{{iTV}}{% elif state_attr(config.entity, 'dev_type') == 'dlna'
%}{{iDLNA}}{% elif state_attr(config.entity, 'dev_type') == 'computer'
%}{{iDesktop}}{% elif state_attr(config.entity, 'dev_type') == 'nas'
%}{{iNAS}}{% elif state_attr(config.entity, 'dev_type') == 'notebook'
%}{{iLaptop}}{% elif state_attr(config.entity, 'dev_type') == 'tablet'
%}{{iTablet}}{% elif state_attr(config.entity, 'dev_type') == 'ipcam'
%}{{iCamera}}{% elif state_attr(config.entity, 'dev_type') ==
'printer' %}{{iPrinter}}{% elif state_attr(config.entity, 'dev_type')
== 'router' %}{{iRouter}}{% elif state_attr(config.entity, 'dev_type')
== 'default' %}{{iDefault}}{% elif state_attr(config.entity,
'dev_type') == 'others' %}{{iOthers}}{% endif %}) {
visibility: visible;
}
type: custom:multiple-entity-row
sort:
ignore_case: true
method: name
type: custom:auto-entities
As far as I could find it, the code is looking to the “config entity” attributes, but is not able to pick up correctly the “dev-type” which determines the icon. Is there anybody who can see what I need to do to adjust the code to have it working again?