Feature request: new sensor: phone screen on/off sensor

Hi @MrMep

I have a new idea for new automation. I want to track when I’m awake from my sleep using my phone screen. I have the habit of checking my phone when I wake up. If the screen is on, zanzito will publish to the broker with the value ‘on’. If it is on for more than a minute during certain time, it will trigger the automation such as starting the coffee machine.

Do you think this is possible?

Hi @masterkenobi,

Some time ago I analyzed for a while the possibility of sending infos about user’s activity, precisely the status of the screen and, possibly, the foreground app.
If I remember well, Android understandably doesn’t allow per se the collection of such information from a background app or service (for privacy and security reasons).
Nonetheless I might come up with a solution… we’ll see…

thanks for your suggestion!

1 Like

There is activity detection@MrMep, is this sensor integrable ?

yes it’s interesting. I’m a little bit worried about the possibile impact on battery, because Activity detection activates the accelerometer continuously (although at low energy). Noted :wink:

1 Like

you can use Tasker to send commands to HA. Its pretty useful… for example, you can mute your Sonos or whatever, when your phone is ringing…

It’s done in Zanzito 1.2, please see here


1 Like

Thank you so much!

1 Like