Add power state detection