Sensor card


The sensor card gives you a quick overview of your sensors state with an optional graph to visualize change over time.

Screenshot of the sensor card Screenshot of the sensor card.

To add the sensor card to your user interface:

  1. In the top right of the screen, select the pencil icon.
    • If this is your first time editing a dashboard, the Edit dashboard dialog appears.
      • By editing the dashboard, you are taking over control of this dashboard.
      • This means that it is no longer automatically updated when new dashboard elements become available.
      • To continue, in the dialog, select the three dots menu, then select Take control.
  2. Add a card to your dashboard.

All options for this card can be configured via the user interface.

YAML configuration

The following YAML options are available when you use YAML mode or just prefer to use YAML in the code editor in the UI.

Configuration Variables

type string Required

sensor

entity string Required

Entity ID of sensor domain.

icon string (Optional)

The card icon.

name string (Optional)

The card name.

graph string (Optional)

Type of graph (none or line).

unit string (Optional)

The unit of measurement.

detail integer (Optional, default: 1)

Detail of the graph 1 or 2 (1 = one point/hour, 2 = six points/hour).

hours_to_show integer (Optional, default: 24)

Hours to show in graph. Minimum is 1 hour. Big values can result in delayed rendering, especially if the selected entities have a lot of state changes.

limits map (Optional)

Limits of the graph Y-axis.

min float (Optional)

Minimum value of the graph Y-axis.

Default:

The minimum sample among the displayed values.

max float (Optional)

Maximum value of the graph Y-axis.

Default:

The maximum sample among the displayed values.

theme string (Optional)

Override the used theme for this card with any loaded theme. For more information about themes, see the frontend documentation.

Example

type: sensor
entity: sensor.illumination
name: Illumination

Related topics