-
Notifications
You must be signed in to change notification settings - Fork 4
/
internet_usage_per_user_card.yaml
74 lines (72 loc) · 1.87 KB
/
internet_usage_per_user_card.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
type: markdown
content: |-
{% set clients = state_attr('sensor.client_usage','usage_data')%}
<table>
<thead>
<tr>
<th>Name</th>
<th>Uploaded(5s)</th>
<th>Downloaded(5s)</th>
<th>Total Utilization</th>
</tr>
</thead>
<tbody>{% for i in range(0, clients | count ) %}
<tr class="active-row">
<td>{{ clients[i]['client_ip'] }}</td>
<td>{{ clients[i]['txps'] }}</td>
<td>{{ clients[i]['rxps'] }}</td>
<td>{{ clients[i]['gbm'] }}</td>
</tr>{% endfor %}
</tbody>
</table>
card_mod:
style:
.: |
ha-card {
border-style: none;
background-color: auto;
box-shadow: 0px 0px 10px -9px black;
}
ha-markdown {
padding: 0 0 0px 0 !important;
border-radius: 10px;
}
ha-markdown $: |
table {
border-collapse: separate;
border-spacing: 0;
border-radius: 10px;
margin: 25px 0;
font-size: 0.9em;
min-width: 100%;
}
table thead tr {
background-color: #2b79d6;
color: #ffffff;
text-align: left;
}
table th:first-child {
padding: 8px;
border-radius: 10px 0px 0px 0px;
}
table th:last-child {
padding: 8px;
border-radius: 0px 10px 0px 0px;
}
table td {
padding: 12px 15px;
}
table tbody tr {
border-bottom: 0px solid #dddddd;
}
table tbody tr:nth-of-type(even) {
background-color: var(--primary-background-color);
color: auto
}
table tbody tr:last-of-type {
border-bottom: 2px solid #4e8cd6;
}
table tbody tr.active-row {
font-weight: bold;
color: #009879;
}