I think this fixes #7988.  It was trying to push history for devices out of the normal range.  This caused a history query for each device.  Now it checks if it should try to get this history before it queries the database.
Changed the version to alpha5