How to display switch state in dashoard?

I want to display my door switch state in the dashboard. is already receiving data from my door switch sensor, but how to display its state in the dashboard?

  1. What widget type do I need to use?
  2. How to configure the widget to show the door switch state?

My code, to trasmit data from my door switch looks like this:

thing["door"] >> [](pson& out) { out = digitalRead(PIN_SWITCH); };

As you may know, the state cannot be manipulated from remote! It is a read-only device.

If I am not mistaking, it seems like there is no widget to display a boolean value e.g. a switch ON/OFF, which would actually be nice. The best options you probably have are: Donut Chart, Progressbar, or Text/Value to show the ON/OFF (OPEN/CLOSE) state of the door, but it may not look optimal in the dashboard :slight_smile: