Using per-state last_changed and got rid of my own changed tracking. Simpler is better after all.
Fixed idle state's last_changed to track last time user was active.
Added special handling for state=on - it equals now.