code: def lock(self):
          
          if not self.__lock_state:
              data = self._controller.command(self._id, 'charge_port_door_close',
                                              wake_if_asleep=True)
              if data['response']['result']:
                  self.__lock_state = True
              self.__manual_update_time = time.time()
docs: Close the charger door.