def update(self):
self._controller.update(self._id, wake_if_asleep=False)<EOL>data = self._controller.get_charging_params(self._id)<EOL>if data:<EOL><INDENT>self.__battery_level = data['<STR_LIT>']<EOL>self.__charging_state = data['<STR_LIT>']<EOL><DEDENT>
Update the battery state.