You can iterate through the list. I’m not best with Jinja, but I’m sure it can be done.
I modified some other array responses and found a solution. Posting below for anyone else that needs to find a specific MAC or Device
| map(attribute='mac') | select('search', 'xx:xx:xx:xx:xx:xx')
| list | count }}’’’
If that results in “1”, it’s active, otherwise it’s inactive.
Thanks! that was what I was looking for
How/where do I change the scan interval from 15 minute?
Thanks.
How do I change row color of flex table when the device name is ‘Unknown Device’
I tried this:
css:
tbody tr+: “user-select: text”
table+: “border: 0;”
thead th: “background-color: #aaa”
tbody tr:
- background-color: |
{% set n = x.name %}
{% if (n == ‘Unknown Device’) %} red
{endif}
I ended up adding a conditional statement to the modify property.
type: custom:flex-table-card
title: Clients
grid_options:
columns: 24
entities:
include: sensor.network_scanner
sort_by: x.ip+
columns:
- name: IP Address
data: devices
modify: x.ip
- name: MAC Address
data: devices
modify: x.mac
- name: Name
data: devices
modify: |-
if (x.name == 'Unknown Device'){
'<div style="background-color:lightcoral">' + x.name + '</div';}
else {
x.name
}
- name: Description
data: devices
modify: |-
if (x.type == 'Unknown Device'){
'<div style="background-color:lightcoral">' + x.type + '</div';}
else {
x.type
}
- name: Vendor
data: devices
modify: x.vendor
css:
table+: "border: 0;"
thead th: "background-color: #aaa"
tbody tr+: "user-select: text"
tbody tr:hover: "background-color: gold!important;"
Any idea how to add the count of devices as the title for the flex table card configuration?
I haven’t used flex table card.
This is what I have as a collapsable card with total devices at the top, it’s not the prettiest, but with a little work
HTH
type: custom:collapsable-cards
title: Network Devices
title_card:
type: tile
entity: sensor.network_scanner
vertical: true
show_entity_picture: false
buttonStyle: "font-size: 24px;"
show_header_toggle: true
cards:
- type: custom:flex-table-card
title: Clients
grid_options:
columns: 24
entities:
include: sensor.network_scanner
sort_by: x.ip+
columns:
- name: IP Address
data: devices
modify: x.ip
- name: MAC Address
data: devices
modify: x.mac
- name: Name
data: devices
modify: |-
if (x.name == 'Unknown Device'){
'<div style="background-color:lightcoral">' + x.name + '</div';}
else {
x.name
}
- name: Description
data: devices
modify: |-
if (x.type == 'Unknown Device'){
'<div style="background-color:lightcoral">' + x.type + '</div';}
else {
x.type
}
- name: Vendor
data: devices
modify: x.vendor
css:
table+: "border: 0;"
thead th: "background-color: #aaa"
tbody tr+: "user-select: text"
tbody tr:hover: "background-color: gold!important;"
This is odd, to me it is. I used the Flex Table card and the coding that is provided here. On my PC screen the table is perfect. From my Cell phone running the HA app I get a "Custom element doesn’t exist: flex-table-card. Why would this happen??
Thanks
Hello , is there a way to increase the number of entries to more than 25 in the flow dialog box ?
after a couple of days it started working on my Pixel Not sure why but it is working now
You can change the number in Developer Tools under States.