@theKpher I don’t think personally there is a hard and fast way to know definitely if a room is occupied. However I have had good success in tackling this using a multitude if sensors and methods.
As you realised the motion controlled lighting doesn’t work too well when watching TV or reading as people tend to sit very still doing these things and the lights keep going out.
I have done a pretty decent job of tracking occupancy in my rooms and it does work exceedingly well.
I will give you an example of my living room.
I have two motion sensors in the room because of coverage issues due to the size/shape. So first off we we turn on the lights when motion is detected if the lux levels are equal or below 12 or time is between sunset and sunrise with +/-8 min offset.
The lights won’t turn off until all motion sensors have been inactive for 3 mins.
So far so good but as you’ve probably realised the lights go out often. So I have methods to track things we would do in each room e.g. if my TV is on using a modified script of my ASUSWrt script. I have this mapped to a virtual switch so now the light don’t turn off if my TV is on.
So this removes a fair amount of false positives as the TV is in use when the Room Is Occupied. I also have another rule that turns 's off the TV/lights if there has been no motion for 30 mins… The only time this has ever triggered is when I have fallen asleep watching TV.
But as stated that doesn’t get rid of the false positives for example if I have guests around and we are talking with the TV off. So I use the noise dB meter of my netatmo Base Station that turns on/off a virtual switch when the noise level goes above the ambient noise level of the room. This covers that issue off well.
So then if I am reading I read on the sofa in the room. I have a home made pressure sensor that triggers when someone has sat on the sofa. This covers that issue of the lights turning off when reading.
Now that together covers 99% of the instances where lights go out. But it’s not still 100% accurate. E.g. sometimes I will sit on the floor with my laptop. I could track when that is switched on. But it’s a moveable device that can travel between rooms and yet there is no really reliable way to track which room it is in.
So in these rare cases when on my own with no noise and no TV and no motion in the room (this rarely happens) when the first time the light goes out I just move so the light switches back on and say “Alexa turn on living room manual” This disables further automation in that room until the virtual switch is turned off again (i do have a reset that will turn back off this manual switch after 1 hour if there is no motion, TV, or noise in that hour. Just in case I forgot to turn it off. A mode change also turns off this switch.
I have a manual virtual switch for each room as a simple way to override the automation when it doesn’t match the desired behaviour. In automation it’s pretty impossible to cater for the 100 percentile in your automation, but if you get it to 99 percentile you are doing well. With that in mind you need a way to quickly override and stop automation when needed.
I also have a Manual Mode which disables all automation in the house be it lights/heating/locks etc… Not 100% needed but I have used it during some ST platform issues to prevent undesired behaviour