Toggle Graph Card
The hc_toggle_graph_card extends hc_graph_card by linking a sensor graph to a second entity that can be toggled from the card.
Usage
- type: custom:button-card
template: hc_toggle_graph_card
entity: <your sensor entity>
name: Heater
variables:
toggle_entity: <your switch entity>
active_color: var(--color-orange)
Remember to take care of indentation
Variable / entry
| Variable | Default | Required | Example |
|---|---|---|---|
| entity | Yes | sensor.heater_power | |
| name | friendly name | No | Heater |
| toggle_entity | Yes | switch.heater | |
| active_color | var(–primary-color) | No | var(–color-orange) |
| active_content_color | white | No | white |
| active_icon_background | var(–opacity-contrast-100) | No | var(–opacity-contrast-100) |
| inactive_background | var(–ha-card-background) | No | var(–ha-card-background) |
| inactive_name_color | var(–subtext-color) | No | var(–subtext-color) |
| inactive_state_color | var(–primary-text-color) | No | var(–primary-text-color) |
| inactive_icon_color | var(–icon-color-default) | No | var(–icon-color-default) |
| inactive_icon_background | var(–background-icon-color-default) | No | var(–background-icon-color-default) |
| show_graph_fill | true | No | true |
| show_graph_line | true | No | true |
| show_icon | true | No | true |
More info
This card inherits graph behavior from hc_graph_card, including the Mini Graph Card dependency.