Skip to content

Instantly share code, notes, and snippets.

@hudsonbrendon
Created March 28, 2022 00:12
Show Gist options
  • Save hudsonbrendon/75d6f2f53bf03906f205adae85bf56bb to your computer and use it in GitHub Desktop.
Save hudsonbrendon/75d6f2f53bf03906f205adae85bf56bb to your computer and use it in GitHub Desktop.
Table devices
type: vertical-stack
cards:
- type: vertical-stack
cards:
- type: markdown
content: '#### 5 Ghz'
- type: custom:auto-entities
filter:
include:
- attributes:
router_mac: 28:D1:27:9F:4C:14
connection: 5 Ghz
card:
type: custom:flex-table-card
clickable: false
sort_by: ip+
columns:
- data: icon
name: ' '
- data: friendly_name
name: Dispositivo
- data: ip
name: IP
modify: 'x === "0:0:0:0" ? "" : x'
- data: mac
name: MAC
- data: signal
name: Sinal
modify: 'x === 0 ? "" : x'
- data: state
name: Estado
modify: 'x === "home" ? "online" : "offline"'
- data: online
name: Tempo de atividade
modify: 'x === "0:00:00" ? "" : x'
- data: last_activity
name: Última atividade
modify: x.replace(/T/i, " ")
css:
table+: 'padding-top: 15px;'
tbody tr:nth-child(even): 'background-color: #a2542f6;'
td.left: 'padding: 10px 10px 10px 10px'
th.left: 'padding: 0px 0px 10px 10px; width: 200px'
th.left:nth-child(1): 'width: 44px'
th.left:nth-child(2): 'width: 330px'
- type: vertical-stack
cards:
- type: markdown
content: '#### 2.4 Ghz'
- type: custom:auto-entities
filter:
include:
- attributes:
router_mac: 28:D1:27:9F:4C:14
connection: 2.4 Ghz
card:
type: custom:flex-table-card
clickable: false
sort_by: ip+
columns:
- data: icon
name: ' '
- data: friendly_name
name: Dispositivo
- data: ip
name: IP
modify: 'x === "0:0:0:0" ? "" : x'
- data: mac
name: MAC
- data: signal
name: Sinal
modify: 'x === 0 ? "" : x'
- data: state
name: Estado
modify: 'x === "home" ? "online" : "offline"'
- data: online
name: Tempo de atividade
modify: 'x === "0:00:00" ? "" : x'
- data: last_activity
name: Última atividade
modify: x.replace(/T/i, " ")
css:
table+: 'padding-top: 15px;'
tbody tr:nth-child(even): 'background-color: #a2542f6;'
td.left: 'padding: 10px 10px 10px 10px'
th.left: 'padding: 0px 0px 10px 10px; width: 200px'
th.left:nth-child(1): 'width: 44px'
th.left:nth-child(2): 'width: 330px'
- type: vertical-stack
cards:
- type: markdown
content: '#### Lan'
- type: custom:auto-entities
filter:
include:
- attributes:
router_mac: 28:D1:27:9F:4C:14
connection: Lan
card:
type: custom:flex-table-card
clickable: false
sort_by: ip+
columns:
- data: icon
name: ' '
- data: friendly_name
name: Dispositivo
- data: ip
name: IP
modify: 'x === "0:0:0:0" ? "" : x'
- data: mac
name: MAC
- data: signal
name: Sinal
modify: 'x === 0 ? "" : x'
- data: state
name: Estado
modify: 'x === "home" ? "online" : "offline"'
- data: online
name: Tempo de atividade
modify: 'x === "0:00:00" ? "" : x'
- data: last_activity
name: Última atividade
modify: x.replace(/T/i, " ")
css:
table+: 'padding-top: 15px;'
tbody tr:nth-child(even): 'background-color: #a2542f6;'
td.left: 'padding: 10px 10px 10px 10px'
th.left: 'padding: 0px 0px 10px 10px; width: 200px'
th.left:nth-child(1): 'width: 44px'
th.left:nth-child(2): 'width: 330px'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment