thejeffreystone / home-assistant-configuration

My Old Home Assistant Config. For more Information visit ->
https://slacker-labs.com
415 stars 69 forks source link

Driving Time History stats #136

Open tbeav1 opened 3 years ago

tbeav1 commented 3 years ago

Hi there,

Trying to integrate a bunch of your code in to my HA environment. I can't for the life of me figure out how you are getting the data for the binary_sensor.kat_driving & binary_sensor.jeff_driving sensors in your home.yaml

Are you willing to elaborate on where that data is coming from and how it's getting to those sensors?

welcome[bot] commented 3 years ago

Thanks for helping make this code better! This is the place to request enhancements, ask questions and other things. You can also ask questions via twitter or https://jeffreystone.net

thejeffreystone commented 3 years ago

Oh man, I totally forgot to answer this. I apologize dude.

I was attempting to use templates for binary sensors. I use Life360 for my primary presence tracker, and the device trackers you get with that integration includes some for current speed and one that attempts to determine if the person is driving. I was attempting to use the attributes from the Life360 integration to create a simple binary sensor to say whether someone was driving based on speed to make it easier to use in automations.

But like I said I am not sure it has ever worked and I really haven't played more with it. But Life360 is free if you wanted to try it out.

BrttClne22 commented 2 years ago

If you use the Home Assistant companion app it can expose a "Detected Activity" sensor that may be helpful with this. Looks like the iOS app gives you "Automotive" while Android would give you "in_vehicle". Both platforms appear to expose a certainty level as an attribute that may be helpful as well.

https://companion.home-assistant.io/docs/core/sensors/#activity-sensors