Help with bed senor

Hello, I just made a bed sensor with esp32 with this guide

everything works good, and I did some light automations if no one on the bed but I want to do more things and I dont know how,
I have 4 sesnors:

I want to connect 2 sensors and calculate sleep time like this

someone know how can I do it?

and I want to make a button that tell me if me, my gf or nobody on the bed.
like this:

I dont care about the graphics of the button, for me its can be regular entity but just change the state or something.

Thank you!!

Where did you get those icons at the bottom of your post ?

Its not mine, but I think he did it with this guide

I think you can use picture elements card for showing occupancy of you bed. link
You show picture of your empty bed permanently and overlay picture of you or your girlfriend according to state of your sensors.

1 Like