Any HADashboard experts happen to know if state_map work for sensors please?

Hi, I’ve searched this, however can’t find a definitive answer it’ still supported or there’s a replacements, many old threads on the subject without any joy.

At current with the latest version of HA and HADashboard would someone be so kind to help out please.

researching the docs it shows how you can mask the output of a state into something friendly, i.e.

state_map:
  "on": Aan
  "off": Uit

With my example it does not error however doesn’t mask, only showing on or off in the panel.

outside_light:
    widget_type: sensor
    title: Outside
    entity: binary_sensor.light_outdoor_status
state_map:
   "on": Light On
   "off": Light Off

Thanks in advance.

You are using the wrong indentation. try this:

outside_light:
   widget_type: sensor
   title: Outside
   entity: binary_sensor.light_outdoor_status
   state_map:
      "on": Light On
      "off": Light Off
1 Like

Your absolutely right, thank you so much :+1: