Fix #327 Hide add device button when appropriate.