Skip to content

Instantly share code, notes, and snippets.

@jrgutier
Created June 15, 2023 21:07
Show Gist options
  • Save jrgutier/dec99477b9658c907c4025da78cf9ed4 to your computer and use it in GitHub Desktop.
Save jrgutier/dec99477b9658c907c4025da78cf9ed4 to your computer and use it in GitHub Desktop.
Rivian Charging Curve HA Card
type: custom:config-template-card
variables:
FIND_SPAN: |
temp => {
if (temp == 'unknown') {
return '12h';
}
else {
return temp+'s';
}
}
START: states['sensor.r1t_charging_time_elapsed'].state
entities:
- sensor.r1t_charging_time_elapsed
card:
type: custom:apexcharts-card
graph_span: ${FIND_SPAN(START)}
yaxis:
- id: soc
min: 0
max: 100
decimals: 0
apex_config:
tickAmount: 4
- id: kw
decimals: 0
apex_config:
tickAmount: 4
opposite: true
header:
show: true
title: Charging Curve
show_states: true
colorize_states: true
series:
- entity: sensor.r1t_battery_state_of_charge
yaxis_id: soc
group_by:
func: first
duration: 10s
- entity: sensor.r1t_charging_speed
yaxis_id: kw
type: column
group_by:
func: first
duration: 10s
@jrgutier
Copy link
Author

Use HACS to install config-template-card and apexcharts-card

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment