Skip to content

Card Switch

dckiller51 edited this page Oct 16, 2026 · 2 revisions

🔌 Switch Card (switch)

A simple on/off tile. Tap it to toggle. Made for switch.* entities, and works with anything Home Assistant can toggle whose state is on / off: input_boolean, fan, automation…

For a light with brightness and colour, use the Light card instead.

📸 Preview

✨ Features & Possibilities

  • Tap anywhere on the tile: calls <domain>.toggle on the entity.
  • Name and state (On / Off, in the remote's language).
  • Colour when on: the whole tile takes the on_color background, green by default. A dark red for a heater, a blue for a fan…
  • Icon: power (default), heater, fan or bulb, or one of your PNG icons (since 1.2.9).

⚙️ Options Reference

Parameter Type Default Description
type string — switch
entity_id string — The entity to toggle. Required.
name string friendly name Name shown on the tile.
on_color string #FF2E5A46 (green) Tile background when on: #RRGGBB, or #AARRGGBB for transparency, e.g. #805A1F1F.
icon string power Keyword: heater (or heat), fan, bulb (or light), or a PNG path like /sdcard/astrion/icons/heater.png (1.2.9+). Anything else shows the power icon.

Before 1.2.9, a PNG path showed the power icon and a 6-digit on_color made the tile transparent.

📄 JSON Configuration Example

[
  { "type": "switch", "options": { "entity_id": "switch.towel_heater", "name": "Towel heater",
                                   "icon": "heater", "on_color": "#FF5A1F1F" } },
  { "type": "switch", "options": { "entity_id": "fan.bedroom", "name": "Bedroom fan", "icon": "fan",
                                   "on_color": "#FF1F3A5A" } },
  { "type": "switch", "options": { "entity_id": "input_boolean.guest_mode", "name": "Guest mode" } }
]

💡 Two switches side by side: put them in a Row.

See also: Card Light · Builder

Clone this wiki locally