Display of charts for binary sensors

Feature description
The graphics make a lot of sense and are very useful. However, for binary-type devices (on/off, presence, opening, etc.) they don’t make much sense.

The data types that will not be supported by the graphics are as follows:

  • Binary
  • Push
  • Camera
  • Color

A dedicated view, accessible on the dashboard (but why not a new section in the web interface as well), would be needed to consult the data history.

For example (and prettier :wink: ):


Thanks for the request!

Why do you need this feature? Tell me about your personal use case, so we can get an idea of the exact spec :slight_smile:

For the moment, I would like to be able to consult the history of openings of my front door.

I see several advantages to this:

  • In case of a break-in, I will have the exact time
  • When I slam my door and go for a walk with my dog in the residence, I can make sure no one has entered in my absence (#Lazybone :sweat_smile:)

And then later, do some usage statistics, including how many times per day we open the fridge and correlate it with the temperature drop / electricity consumption.

Ok, so in short:

  • In the interface, we just display the last 12/24 hours, that does the job
  • If needed, you can select a specific date and see the history for that date

However, there is absolutely no need to visualize 3 months of history at once (it would be too small and unreadable)

Yes, you’ve summed up the situation well. Even if it might be interesting to know how many times per day the door was opened over a period of 3 months, for example.

Hello everyone,

How do you see the implementation? An addition to the « chart Â» box or a new box? Or something completely different?

I think it’s a new type of chart. :thinking:
Then, depending on the sensor, maybe we need to disable or hide some types?

From my point of view we should be able to implement it in the current graphical view
 But I imagine it will mess up the rendering itself.

Unless, as @spenceur suggested, if we choose « binary sensor Â» as the chart type then only binary sensors can be included to ensure a consistent rendering.

Just a new chart type for binary devices, in the existing chart widget!

My first result:

Any thoughts?

Excellent, that’s perfect :ok_hand:

I like it. But we should prevent placing multiple binary sensors so they don’t overlap, as is currently the case in the graphs for the other signals.

Thanks @_Will_71, I hadn’t thought of that.
We can put several now :slight_smile:

Great!!! Nice work

Perfect :+1:

Here’s the PR:

If anyone wants to test it, I’d appreciate it

Can you generate a Docker image? :pray:

It looks great! Thanks for working on it!

Excellent!! It looks great, it’s exactly what was needed!

Here is the Docker image: delogzway/gladys:binary_graph