def _get_battery(self):
try:<EOL><INDENT>battery = {<EOL>"<STR_LIT>": self._dev.charge(),<EOL>"<STR_LIT>": self._dev.isCharging() == <NUM_LIT:1>,<EOL>}<EOL><DEDENT>except Exception:<EOL><INDENT>return None<EOL><DEDENT>return battery<EOL>
Get the battery