Tonight, as I was driving, I was thinking about how it might be good if I could automate toggling do-not-disturb mode on my phone when I was in the car by the state of the “detected activity” sensor. This way I wouldn’t get bothered by non critical notifications while driving.
Is this sort of thing even possible with home assistant?
This did the trick for me. I have yet to test this out while driving, but here’s the bones of the automation.
I have plans to make this into a blueprint so that my wife can use it as well, but it’s just for me for now. I’d need parameters for the phone detected activity sensor, a helper for caching the value of the sensor, and the name of the notify service for the phone.