Card Fan - dckiller51/astrion-custom-dashboard GitHub Wiki
๐ Fan Card (fan)
Control a fan: on/off, speed, preset modes and oscillation. The card picks its layout from what the fan can do.
๐ธ Preview
โจ Features & Possibilities
Three layouts:
- Simple: one row. Tap to switch on/off; arrows change the speed by
step%. Picked automatically for a plain fan with only a speed in %. - Full: a power button, preset chips (or a speed stepper if there are none) and an oscillation on/off chip. Picked automatically when the fan has preset modes or can oscillate, e.g. many Xiaomi fans whose speeds are Level 1 to Level 4.
- Step: just โ / speed % / +. No name, no power button. For a fan inside a Row or under a title.
Other details:
- The off preset never gets a chip: the power button does it.
- The presets come from the fan, in its order. You can restrict or reorder them.
โ๏ธ Options Reference
| Parameter | Type | Default | Description |
|---|---|---|---|
type |
string | โ | fan |
entity_id |
string | โ | The fan entity. Required. |
name |
string | friendly name | Name shown on the card. |
style |
string | auto |
auto, simple, full or step. |
step |
int | the fan's step, else 20 |
Speed change per press, in %. |
preset_modes |
list | from the fan | Show only these presets, in this order. |
show_captions |
bool | true |
false hides the captions above the chip rows. |
In the step layout,
stepis sent aspercentage_steptofan.increase_speed/decrease_speed(since 1.2.9; it was ignored before). Without it, the fan's own step is used.
๐ JSON Configuration Example
[
{ "type": "fan", "options": { "entity_id": "fan.mi_standing_fan", "name": "Standing fan",
"preset_modes": ["Level 1", "Level 2", "Level 3", "Level 4"] } },
{ "type": "fan", "options": { "entity_id": "fan.bathroom_extractor", "name": "Bathroom", "style": "simple", "step": 25 } }
]
See also: Card Climate ยท Card Switch