Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

Getting the duration of previous state of a sensor

$
0
0

@Skye wrote:

I’m using an A2DP sensor to see how long my commutes are (phone connected to car = sensor is ‘on’).
I would like to push a notification to my phone telling me how long I’ve driven at the moment the A2DP sensor turns to ‘off’.

To be able to do so I would need to know the duration of the previous state (which is ‘on’). Things coming to mind is starting/stopping a timer, using input fields to store the timestamps , perhaps a statistics sensor?

But perhaps there is an easier way to grab this data as HA is already recording it and the History graph card can show it?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>