|
type: custom:stack-in-card |
|
cards: |
|
- type: custom:mini-graph-card |
|
icon: mdi:download-network |
|
entities: |
|
- entity: sensor.xfinity_data_used |
|
name: Xfinity Data |
|
show_graph: false |
|
aggregate_func: last |
|
- entity: sensor.xfinity_data_used_today |
|
name: Xfinity Data |
|
show_graph: true |
|
show_state: true |
|
aggregate_func: last |
|
hours_to_show: 672 |
|
group_by: date |
|
font_size_header: 14 |
|
font_size: 100 |
|
line_width: 3 |
|
group: false |
|
lower_bound: 0 |
|
animate: true |
|
smoothing: false |
|
color_thresholds: |
|
- value: 0 |
|
color: "rgba(42, 187, 155, 0.9)" |
|
- value: 30 |
|
color: "var(--label-badge-yellow)" |
|
- value: 40 |
|
color: "#b93829" |
|
show: |
|
points: false |
|
labels: false |
|
labels_secondary: false |
|
legend: false |
|
graph: bar |
|
tap_action: none |
|
style: | |
|
.name > span { font-weight: 400 !important; text-transform: uppercase; } |
|
|
|
- type: entities |
|
show_header_toggle: false |
|
entities: |
|
- type: custom:bar-card |
|
name: Xfinity |
|
icon: mdi:download-network |
|
entity: sensor.xfinity_data_used |
|
unit_of_measurement: "GB" |
|
entity_row: true |
|
max: 1229 |
|
severity: |
|
- from: 950 |
|
to: 1100 |
|
color: "var(--label-badge-yellow)" |
|
- from: 1100 |
|
to: 1229 |
|
color: "#b93829" |
|
positions: |
|
name: off |
|
value: off |
|
indicator: off |
|
height: 30px |
|
style: |- |
|
bar-card-background { margin-right: 13px !important; margin-top: 5px !important; } |
|
bar-card-value { margin-right: 0 !important; } |
|
tap_action: none |
|
- type: custom:bar-card |
|
name: Month Percent |
|
icon: mdi:calendar-arrow-right |
|
entity: sensor.month_percent |
|
unit_of_measurement: "%" |
|
entity_row: true |
|
max: 100 |
|
positions: |
|
name: off |
|
value: off |
|
indicator: off |
|
height: 30px |
|
style: |- |
|
bar-card-background { margin-right: 13px !important; margin-top: 5px !important; } |
|
bar-card-value { margin-right: 0 !important; } |
|
tap_action: none |
|
style: | |
|
.card-header { padding-top: 4px; padding-bottom: 12px; } |
|
.card-header .name { font-size: 16.8px; font-weight: 400; text-transform: uppercase; opacity: 0.65; } |
|
|
|
- type: markdown |
|
style: | |
|
ha-markdown.no-header { padding-top: 0 !important; text-align: center; } |
|
ha-markdown { color: var(--secondary-text-color); } |
|
content: >- |
|
{% set data_used = states('sensor.xfinity_data_used') | int %} |
|
{% set data_total = states('sensor.xfinity_data_total') | int %} |
|
{% set data_remaining = data_total - data_used %} |
|
|
|
{% set month_days_in_current = states('sensor.month_days_in_current') | int %} |
|
{% set month_current_day = states('sensor.month_current_day') | int %} |
|
{% set days_remaining = month_days_in_current - month_current_day %} |
|
|
|
{% if data_remaining >= 0 -%} |
|
{{ data_remaining }} GB remaining to use over the next {{ days_remaining }} {% if days_remaining != 1 %}days{% else %}day{% endif %} |
|
{%- else -%} |
|
**{{ -data_remaining }} GB over with {{ days_remaining }} {% if days_remaining != 1 %}days{% else %}day{% endif %} remaining** |
|
_Xfinity charges $10 per 50 GB of data_ |
|
{%- endif %} |