handle battery state with upower