Status Panel with Elasticsearch

I would like to create a status panel for machine status: on, off, idle using elastic search.

I have tried to use the same query as my single stat panel, but it does not work on the status panel.

Is there an example available to create status panels using elastic search?

Thank you,