It's interesting how I now solve problems.
Problem: I often fall asleep while reading on the bookshop.org app on my phone, and wake up in the morning with the screen still active.
First attempt at solution: a home assistant companion app sensor for Active App and Idle Time triggering a command notification to lock the screen. But neither of those sensors exist.
Option two: LlamaLabs Automate script to do similar locally on the phone, though it's not trivial
Option three: double check Bookshop.org app settings.. No option to set a sleep timer. Check the additional sideways extra secret reading options. Yup, there's a sleep timer setting.
Funny how easy it is to assume that everything is shit and you have to work around it.
@julianlawson can't you just set the phone to turn off screen after certain amount of inactivity? Is bookshop a sort of kindle replacement or are you reading reviews...?