How to create a binary and time-based dashboard card?

Hi,
Is it possible to create a card in the dashboard that would show the opening time from the door and window sensor (binary sensor).

Exactly, it is about displaying in the form of a table the last fifteen openings lasting longer than a certain time, for example lasting longer than 5 minutes. The last opening would have to be read from the current time.

in the example below, the date and time format is an example

image

Main challenge is retrieving this information… unless you already have a solution for that, you either require to store this in different input helpers or with more tweaking in the attributes of some entity.
Getting the data probably means sql query on either states or statistics table, each SQL ientity will only give you one value (the first of the query) regardless what you put in the query

When you have the data, you can then use markdown card or flex-table card or entities to display it

with influxDB query

SELECT * FROM "homeassistant"."autogen"."state" WHERE ("entity_id" = 'drzwi_ganek_kuchnia_contact')

I was able to extract the following data:

but I don’t know how to transfer it to the dashboard

As mentioned, you’d need a SQL integration and you will need 1 for each value

It might be easier to create a influx dash or grafana and integrate that into HA

I’m a new Home Assistant user, I’ve been using it since the beginning of the year. Can you recommend a guide on how to connect influx or grafane with a dashboard

Have a look here, it does not come easy but likely a lot faster than creating different sql sensors

Best way to get Grafana chart into Lovelace card - Share your Projects! / Dashboards & Frontend - Home Assistant Community (home-assistant.io)