Skip to content

Localization and formatting

Flexible Horseshoe Card uses the name, state, unit, precision, icon, area, and locale known by Home Assistant. In many cards, defining the entity is enough.

Start with the entity

entities:
  - entity: sensor.energy_today

Entity tools can now show the localized name, state, unit, icon, and area.

Override the display

Add an override only where this card should look different:

1
2
3
4
5
6
entities:
  - entity: sensor.energy_today
    name: Today
    decimals: 2
    unit: kWh
    icon: mdi:flash

Formatting options

1
2
3
4
5
6
entities:
  - entity: sensor.energy_today
    format:
      separator: false
      decimals_min: 0
      decimals_max: 2
1
2
3
4
5
entities:
  - entity: sensor.device_mode
    format:
      raw_state_keep: true
      raw_state_clean: true
1
2
3
4
entities:
  - entity: sensor.energy_today
    format:
      locale: nl-NL
Option Use
separator Shows or removes number grouping.
decimals_min Sets the minimum displayed decimal places.
decimals_max Sets the maximum displayed decimal places.
raw_state_keep Displays the entity state without normal formatting.
raw_state_clean Replaces underscores in a raw state with spaces.
locale Uses a specific locale for this entity.