Sure. Here you go:
Steps:
- type: vertical-stack
cards:
- type: custom:button-card
entity: sensor.google_fit_dick_steps
name: Vandaag
show_icon: false
show_state: true
state_display: |
[[[
return `<font size=5><b>${entity.state}</b></font> / 6000 stappen`
]]]
style: |
ha-card {
margin-top: 3px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
tap_action:
action: navigate
navigation_path: /ui-map/family_dick_health_steps
styles:
grid:
- grid-template-areas: '"n n graph" "s s graph" "bar bar bar"'
- grid-template-rows: min-content min-content min-content
- grid-template-columns: min-content
name:
- justify-self: start
- padding-left: 10px
- color: rgb(75, 204, 82)
- font-weight: bold
state:
- justify-self: start
- padding-left: 10px
custom_fields:
bar:
- height: 15px
- width: 100%
custom_fields:
bar:
card:
entity: sensor.google_fit_dick_steps
color: rgb(75, 204, 82)
positions:
icon: 'off'
indicator: inside
name: 'off'
type: custom:bar-card
max: 6000
tap_action:
action: navigate
navigation_path: /ui-map/family_dick_health_steps
style: |
bar-card-value {
font-size: 1px;
color: rgb(75, 204, 82);
}
bar-card-markerbar {
background-color: rgba(255, 255, 255, 0.5);
}
ha-card {
margin-top: 7px;
text-align: left;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
- type: custom:apexcharts-card
experimental:
color_threshold: true
apex_config:
min: 0
tickAmount: 4
chart:
height: 250px
tooltip:
enabled: true
series:
- entity: sensor.google_fit_dick_steps
color_threshold:
- value: 0
color: rgb(96, 130, 98)
- value: 6000
color: rgb(75, 204, 82)
name: Stappen
group_by:
func: max
duration: 1d
fill: zero
type: column
graph_span: 7d
span:
end: day
header:
show: true
title: Afgelopen week
floating: false
style: |
ha-card {
margin-top: 10px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
Sleep
- type: vertical-stack
cards:
- type: custom:button-card
entity: input_text.sleeping_total
name: Slaap
show_icon: false
show_state: true
state_display: |
[[[
return `<font size=4><b>${entity.state}</b></font> geslapen.`
]]]
style: |
ha-card {
margin-top: 14px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
tap_action:
action: none
styles:
grid:
- grid-template-areas: '"n n graph" "s s graph" "bar bar bar"'
- grid-template-rows: min-content min-content min-content
- grid-template-columns: min-content
name:
- justify-self: start
- padding-left: 10px
- color: rgb(75, 204, 82)
- font-weight: bold
state:
- justify-self: start
- padding-left: 10px
custom_fields:
bar:
- height: 120px
- width: 100%
- margin-top: '-12px'
custom_fields:
bar:
card:
type: history-graph
entities:
- entity: var.dick_sleep
name: Slaap
hours_to_show: 24
style: |
ha-card {
margin-top: 7px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0);
}
- type: custom:apexcharts-card
experimental:
color_threshold: true
chart_type: line
series:
- entity: sensor.sleeping_states
curve: stepline
stroke_width: 2
color_threshold:
- value: 1
color: '#005580'
- value: 2
color: '#8095FF'
- value: 3
color: '#4DE1FF'
- value: 4
color: '#FF8C19'
span:
start: day
offset: '-3h'
graph_span: 12h
apex_config:
tooltip:
enabled: false
chart:
height: 180px
yaxis:
tickAmount: 3
min: 1
max: 4
opposite: true
labels:
formatter: |
EVAL:function(value) {
if (value == 1) {
return "Diep";
} else if (value == 2) {
return "Licht";
} else if (value == 3) {
return "REM";
} else if (value == 4) {
return "Wakker";
}
}
style: |
ha-card {
margin-top: -65px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
- type: custom:apexcharts-card
chart_type: pie
series:
- entity: input_number.sleeping_state_rem
name: REM
color: '#4DE1FF'
show:
as_duration: second
- entity: input_number.sleeping_state_light
name: Lichte slaap
color: '#8095FF'
show:
as_duration: second
- entity: input_number.sleeping_state_deep
name: Diepe slaap
color: '#005580'
show:
as_duration: second
apex_config:
chart:
height: 250px
style: |
ha-card {
margin-top: -25px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
- type: custom:apexcharts-card
experimental:
color_threshold: true
apex_config:
min: 0
tickAmount: 4
chart:
height: 250px
tooltip:
enabled: true
yaxis:
tickAmount: 3
min: 4
max: 10
opposite: true
labels:
formatter: |
EVAL:function(value) {
return value + " uur";
}
series:
- entity: input_number.sleeping_total
color_threshold:
- value: 0
color: rgb(96, 130, 98)
- value: 6
color: rgb(75, 204, 82)
name: Stappen
group_by:
func: max
duration: 1d
fill: zero
type: column
graph_span: 7d
span:
end: day
header:
show: true
title: Afgelopen week
floating: false
style: |
ha-card {
margin-top: -5px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.0);
}
Electricity, gas & water
- type: vertical-stack
cards:
- type: markdown
style: |
ha-card {
font-size: 150%px;
font-family: 'Open Sans', sans-serif;
border-radius: 12px;
background-color: rgba(255, 255, 255, 0.5);
text-align: center;
}
content: >
<b>Huidig verbruik:</b><br /><table><tr><td>Gasvebruik:
</td><td>{{states.sensor.hourly_gas_consumption.state}} m3/h.
</td><td> <i>(€ {{states.sensor.current_gas_cost.state }} per
uur)</i></td></tr> <tr><td>Elektraverbruik:
</td><td>{{states.sensor.power_consumption.state}} mWh. </td><td>
<i>(€ {{ states.sensor.current_power_cost.state }} per
uur)</i></td></tr> <tr><td>Waterverbruik:
</td><td>{{states.sensor.watermeter_hourly.state}} L/h. </td><td>
<i>(€ {{ states.sensor.current_water_cost.state }} per
uur)</i></td></tr></table>
- type: custom:apexcharts-card
yaxis:
- id: electra
apex_config:
decimalsInFloat: 2
tickAmount: 3
min: 0
max: 5
title:
text: kWh
style:
fontWeight: 600
- id: gas
apex_config:
decimalsInFloat: 2
tickAmount: 3
min: 0
max: 2
title:
text: m3h
style:
fontWeight: 600
- id: water
apex_config:
labels:
show: true
minWidth: 0
maxWidth: 1
decimalsInFloat: 0
tickAmount: 3
min: 0
title:
text: L/h
style:
fontWeight: 600
series:
- entity: sensor.power_consumption
yaxis_id: electra
name: Electra
group_by:
func: avg
duration: 10min
fill: 'null'
type: line
curve: straight
stroke_width: 1
unit: kW
float_precision: 2
color: rgb(255, 208, 0)
- entity: sensor.hourly_gas_consumption
yaxis_id: gas
name: Gasverbruik
group_by:
func: avg
duration: 10min
fill: last
type: line
curve: straight
stroke_width: 1
unit: m3
float_precision: 2
color: rgb(125, 173, 129)
- entity: sensor.watermeter_hourly
yaxis_id: water
name: Waterverbruik
group_by:
func: avg
duration: 10min
fill: last
type: line
curve: straight
stroke_width: 1
unit: L
float_precision: 2
color: rgb(122, 193, 255)
graph_span: 1d
apex_config:
chart:
height: 150px
tooltip:
enabled: true
shared: true
onDatasetHover:
highlightDataSeries: false
x:
show: false
'y':
show: true
header:
show: true
title: Verbruik afgelopen 24 uur
floating: false
now:
show: true
style: |
ha-card {
font-size: 25px;
text-align: center;
margin-top: 8px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.5);
}
img {
border-radius: 50px;
}
- type: custom:apexcharts-card
series:
- entity: sensor.total_water_cost
name: Waterverbruik
group_by:
func: diff
duration: 1d
fill: zero
type: column
curve: stepline
stroke_width: 4
unit: €
float_precision: 2
color: rgb(122, 193, 255)
- entity: sensor.total_gas_cost
name: Gasverbruik
group_by:
func: diff
duration: 1d
fill: zero
type: column
curve: stepline
stroke_width: 4
unit: €
float_precision: 2
color: rgb(125, 173, 129)
- entity: sensor.total_power_cost_low
name: Avondtarief
group_by:
func: diff
duration: 1d
fill: zero
type: column
curve: stepline
stroke_width: 4
unit: €
float_precision: 2
color: rgb(255, 247, 0)
- entity: sensor.total_power_cost_normal
name: Dagtarief
group_by:
func: diff
duration: 1d
fill: zero
type: column
curve: stepline
stroke_width: 4
unit: €
float_precision: 2
color: rgb(255, 208, 0)
graph_span: 7d
stacked: true
span:
end: day
header:
show: true
title: Kosten afgelopen week
floating: false
apex_config:
chart:
height: 180px
tooltip:
enabled: true
shared: true
onDatasetHover:
highlightDataSeries: false
x:
show: false
'y':
show: true
yaxis:
- decimalsInFloat: 0
tickAmount: 4
min: 0
max: 12
title:
text: € per dag
style:
fontWeight: 600
style: |
ha-card {
font-size: 25px;
text-align: center;
margin-top: 8px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
background-color: rgba(255, 255, 255, 0.5);
}
img {
border-radius: 50px;
}